import { forwardRef } from "react"; import TextField from "@mui/material/TextField"; import type { TextFieldProps } from "@mui/material"; import { typographyLevels } from "@/Utils/Theme/Palette"; import { useTheme } from "@mui/material/styles"; import Stack from "@mui/material/Stack"; import { FieldLabel } from "./FieldLabel"; interface TextInputProps extends Omit { fieldLabel?: string; required?: boolean; } export const TextInput = forwardRef(function TextInput( { fieldLabel, required, ...props }, ref ) { const theme = useTheme(); const input = ( ); if (fieldLabel) { return ( {fieldLabel} {input} ); } return input; }); TextInput.displayName = "TextInput";