import React from "react" import { useForm } from "react-hook-form" import { TextField } from "@mui/material" import { RegisterOptions } from "react-hook-form/dist/types/validator" import { StandardTextFieldProps } from "@mui/material/TextField/TextField" import { useFormInputError } from "./form-hooks" interface IFormTextInputProps extends StandardTextFieldProps { form: ReturnType options?: RegisterOptions name: string } export function FormTextInput({ form, options, name, label, helperText, disabled, ...rest }: IFormTextInputProps) { const { register } = form const { hasError, message: errorMessage } = useFormInputError(form, name) return }