import TextField from "@material-ui/core/TextField"; import React, { ChangeEvent } from "react"; import { ErrorInfo } from "../../../classes/client"; type InputProps = { name: string; error?: ErrorInfo; onChange?: (event: ChangeEvent) => void; label: string; required?: boolean; type: string; value?: string autoComplete?: string; fullWidth?: boolean disabled?: boolean } const Input = ({ name, error, onChange, required = true, type, value, label, autoComplete, fullWidth = true, disabled = false }: InputProps) => { const fieldError = error?.fields?.[name]; return ( ); } export default Input;