import { FC } from "react"; import { TextField as InternalTextField } from "@mui/material"; type TextFieldProps = { name: string; label: string; formState: Record; required?: boolean; lines?: number; helperText?: string; }; export const TextField: FC = ({ name, label, formState, required = false, lines = 1, helperText, }) => ( 1} rows={lines} required={required} defaultValue={formState.values[name]} error={Boolean(formState.errors[name])} helperText={formState.errors[name] ?? helperText} InputProps={{ sx: { backgroundColor: "#fff", }, }} /> );