import PropTypes from 'prop-types';
// material-ui
import Divider from '@mui/material/Divider';
import InputAdornment from '@mui/material/InputAdornment';
import InputLabel from '@mui/material/InputLabel';
import OutlinedInput from '@mui/material/OutlinedInput';
import MUIFormControl from '@mui/material/FormControl';
export default function FormControl({ captionLabel, formState, iconPrimary, iconSecondary, placeholder, textPrimary, textSecondary }) {
const IconPrimary = iconPrimary;
const primaryIcon = iconPrimary ? : null;
const IconSecondary = iconSecondary;
const secondaryIcon = iconSecondary ? : null;
const errorState = formState === 'error';
return (
{captionLabel}
{primaryIcon && {primaryIcon}}
{textPrimary && (
<>
{textPrimary}
>
)}
>
}
endAdornment={
<>
{secondaryIcon && {secondaryIcon}}
{textSecondary && (
<>
{textSecondary}
>
)}
>
}
/>
);
}
FormControl.propTypes = {
captionLabel: PropTypes.string,
formState: PropTypes.string,
iconPrimary: PropTypes.any,
iconSecondary: PropTypes.any,
placeholder: PropTypes.string,
textPrimary: PropTypes.string,
textSecondary: PropTypes.string
};