import { FormControlLabel } from '@mui/material'; import { FC, useMemo } from 'react'; import Checkbox from './Checkbox'; import { BodyText } from './Text'; const CheckboxWithLabel: FC = ({ checkboxProps, checked, formControlLabelProps, label, onChange, }) => { const labelElement = useMemo( () => (typeof label === 'string' ? {label} : label), [label], ); return ( } label={labelElement} /> ); }; export default CheckboxWithLabel;