import { FC, memo } from "react"; import { cn } from "../utils"; interface PropsType { email: string; setEmail: (email: string) => void; emailError: string; setEmailError: (error: string) => void; isFocus: boolean; setIsFocus: (isFocus: boolean) => void; } const EmailInput: FC = ({ email, setEmail, setEmailError, emailError, isFocus, setIsFocus, }) => { return ( <>
{ setIsFocus(true); }} onBlur={() => { setIsFocus(false); }} onChange={async (e) => { setEmailError(""); const v = e.target.value; setEmail(v); }} />
{emailError && (
{emailError}
)} ); }; export default memo(EmailInput);