import { type ChangeEvent, type FC, useCallback, type HTMLInputAutoCompleteAttribute } from 'react'; import styles from './TextInput.module.css'; export interface TextInputProps { type?: 'text' | 'password' | 'search' | 'date', value?: string, defaultValue?: string, onChange?: (value: string) => void, placeholder?: string, name?: string, readOnly?: boolean, autoFocus?: boolean, autoComplete?: HTMLInputAutoCompleteAttribute, form?: string, } export const TextInput: FC = ({ type = 'text', onChange, ...props }) => { const handleChange = useCallback((e: ChangeEvent) => { onChange?.(e.target.value); }, [onChange]); return ( ); };