I have the following component:
// ...
type StringOrNumber = string | number;
type InputProps<T extends StringOrNumber> = {
value: T;
onSubmit: (value: T) => void;
};
export default function Input<T extends StringOrNumber>(props: InputProps<T>) {
const [value, setValue] = useState(props.value.toString());
// Called on enter & blur
const submitValue = () => {
//