Spaces:
Sleeping
Sleeping
File size: 583 Bytes
741554a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
import { useMemo, useState } from "react";
import classNames from "classnames";
import { on } from "events";
interface Props {
value: string;
onChange: (value: string) => void;
}
export const Parameter: React.FC<Props> = ({ value, onChange }) => {
const [state, setState] = useState(value);
return (
<input
type="text"
className="bg-indigo-600 !text-white px-1.5 rounded-md outline-none bg-opacity-80 max-w-[80px] text-center truncate"
onBlur={() => onChange(state)}
value={state}
onChange={(e) => setState(e.target.value)}
/>
);
};
|