import s from './InputWrapper.module.scss'; import { useField } from 'formik'; import { useState, useEffect } from 'react'; type InputWrapperT = { type: string; labelFor: string; name: string; tag: string; maxLength?: string; placeholder: string; }; const InputWrapper = ({ ...props }: InputWrapperT) => { const { type, labelFor, name, tag, maxLength, placeholder } = props; const [field, meta]: any = useField(props); let error: string = ''; let isError: boolean = !!error; if (meta.touched) { error = meta.error; isError = !!error; } return (