'use client' import { FormControl, FormErrorMessage, FormLabel, Input } from '@chakra-ui/react' import { useField } from 'formik' type Props = React.InputHTMLAttributes & { name: string, label: string, isTextArea?: boolean } export const InputField: React.FC = ({size: _, isTextArea=false, ...props}) => { const [field, { error }] = useField(props) const { label, placeholder } = props return ( {label} {error ? {error} : null} ) }