import { Box, TextField, TextFieldProps } from '@mui/material'; import Typography from '@mui/material/Typography'; import React from 'react'; type OwnProps = { description?: string; value: string | number; onOwnChange: (value: string) => void; placeholder?: string; }; const TextFieldWithDesc = ({ description, value, onOwnChange, placeholder, ...props }: TextFieldProps & OwnProps) => { return ( onOwnChange(event.target.value)} {...props} /> {description && ( {description} )} ); }; export default TextFieldWithDesc;