import { FormControl as MUIFormControl, FormControlProps as MUIFormControlProps, } from '@mui/material'; import OutlinedInput, { OutlinedInputProps } from './OutlinedInput'; import OutlinedInputLabel, { OutlinedInputLabelProps, } from './OutlinedInputLabel'; type OutlinedInputWithLabelOptionalProps = { formControlProps?: Partial; id?: string; inputProps?: Partial; inputLabelProps?: Partial; }; type OutlinedInputWithLabelProps = { label: string; } & OutlinedInputWithLabelOptionalProps; const OUTLINED_INPUT_WITH_LABEL_DEFAULT_PROPS: Required = { formControlProps: {}, id: '', inputProps: {}, inputLabelProps: {}, }; const OutlinedInputWithLabel = ({ formControlProps = OUTLINED_INPUT_WITH_LABEL_DEFAULT_PROPS.formControlProps, id = OUTLINED_INPUT_WITH_LABEL_DEFAULT_PROPS.id, inputProps = OUTLINED_INPUT_WITH_LABEL_DEFAULT_PROPS.inputProps, inputLabelProps = OUTLINED_INPUT_WITH_LABEL_DEFAULT_PROPS.inputLabelProps, label, }: OutlinedInputWithLabelProps): JSX.Element => ( // eslint-disable-next-line react/jsx-props-no-spreading {/* eslint-disable-next-line react/jsx-props-no-spreading */} {label} ); OutlinedInputWithLabel.defaultProps = OUTLINED_INPUT_WITH_LABEL_DEFAULT_PROPS; export type { OutlinedInputWithLabelProps }; export default OutlinedInputWithLabel;