import { type FC, useId } from "react" import { ElasticInput } from "." export type TextInputProps = { value: string set?: ((value: string) => void) | undefined label?: string placeholder?: string autoSize?: boolean readOnly?: boolean testid?: string } export const TextInput: FC = ({ value, set, label, placeholder, autoSize = false, testid, }) => { const htmlId = useId() return ( {label ? : null} {autoSize ? ( set?.(e.target.value)} disabled={set === undefined} placeholder={placeholder} data-testid={testid} /> ) : ( set?.(e.target.value)} disabled={set === undefined} placeholder={placeholder} data-testid={testid} /> )} ) }