2023-07-04 11:37:50 +02:00
|
|
|
import CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank';
|
|
|
|
import CheckBoxIcon from '@mui/icons-material/CheckBox';
|
|
|
|
import { Checkbox, styled } from '@mui/material';
|
|
|
|
|
|
|
|
const SelectOptionCheckbox = styled(Checkbox)(({ theme }) => ({
|
|
|
|
marginRight: theme.spacing(0.4),
|
|
|
|
}));
|
|
|
|
|
|
|
|
export const renderOption = (
|
|
|
|
props: object,
|
|
|
|
option: { label: string },
|
2023-10-02 14:25:46 +02:00
|
|
|
{ selected }: { selected: boolean },
|
2023-07-04 11:37:50 +02:00
|
|
|
) => (
|
|
|
|
<li {...props}>
|
|
|
|
<SelectOptionCheckbox
|
2023-10-02 14:25:46 +02:00
|
|
|
icon={<CheckBoxOutlineBlankIcon fontSize='small' />}
|
|
|
|
checkedIcon={<CheckBoxIcon fontSize='small' />}
|
2023-07-04 11:37:50 +02:00
|
|
|
checked={selected}
|
|
|
|
/>
|
|
|
|
{option.label}
|
|
|
|
</li>
|
|
|
|
);
|