import React, { useEffect, useRef } from 'react'; export default function TextInput({ type = 'text', name, value, className, autoComplete, required, isFocused, handleChange, isError, readOnly = false }) { const input = useRef(); useEffect(() => { if (isFocused) { input.current.focus(); } }, []); if (type === "textarea") { return ( ) } return (
handleChange(e)} readOnly={readOnly} />
); }