import { TextField as MUITextField } from '@mui/material';
import clsx from 'clsx';
import { useField } from 'formik';
import { fieldToTextField, TextFieldProps } from 'formik-mui';
import { FC } from 'react';
import css from './TextField.module.scss';
/**
* Constructs a TextField with the formik validation
* @param props Props to pass to the Textield component
* @example
* ```jsx
*
* ```
*/
export const TextField: FC = (props) => {
const [{ value, onChange, onBlur }, { error, touched }] = useField(props.field.name);
const textFieldHasErrors = Boolean(error) && touched;
return (
);
};