import React, { memo } from 'react'; import clsx from 'clsx'; import MuiCheckbox from '@mui/material/Checkbox'; import type { CheckboxProps as MuiCheckboxProps } from '@mui/material/Checkbox'; import FormControlLabel from '@mui/material/FormControlLabel'; import type { FormControlLabelProps } from '@mui/material/FormControlLabel'; import { ASSETS_URL } from '../../../consts/common'; import { CustomIcon } from '../../custom-icon'; import createClasses from './styles'; export interface CheckboxProps extends MuiCheckboxProps { /** * An error state flag for the checkbox component. */ error?: boolean; /** * Props which will be supplied directly into the form control label component. */ formControlLabelProps?: Omit; } const Checkbox = (props: CheckboxProps) => { const { checked, disabled, error, indeterminate, formControlLabelProps, ...checkboxProps } = props; const styles = createClasses(); const renderedCheckbox = ( } disabled={disabled} indeterminate={indeterminate} indeterminateIcon={ } /> ); return formControlLabelProps ? ( ) : ( renderedCheckbox ); }; const m = memo(Checkbox); export { m as Checkbox };