import { FC, useRef } from "react" import IconClose from "../icon/IconClose" import classNames from "classnames" interface Props { value: string placeholder: string onChange: (value: string) => void required?: boolean className?: string icon?: any } const InputText: FC = ({ value, onChange, placeholder, icon, className = "", required = false, }) => { const inputRef = useRef(null) return (
{icon &&
{icon}
} onChange(event.target.value)} type={"text"} required={required} onFocus={() => inputRef.current?.select()} />
onChange("")}>
) } export default InputText