mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-04 00:18:01 +01:00
24 lines
703 B
TypeScript
24 lines
703 B
TypeScript
|
import CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank';
|
||
|
import CheckBoxIcon from '@mui/icons-material/CheckBox';
|
||
|
import React from 'react';
|
||
|
import { Checkbox, styled } from '@mui/material';
|
||
|
|
||
|
const SelectOptionCheckbox = styled(Checkbox)(({ theme }) => ({
|
||
|
marginRight: theme.spacing(0.4),
|
||
|
}));
|
||
|
|
||
|
export const renderOption = (
|
||
|
props: object,
|
||
|
option: { label: string },
|
||
|
{ selected }: { selected: boolean }
|
||
|
) => (
|
||
|
<li {...props}>
|
||
|
<SelectOptionCheckbox
|
||
|
icon={<CheckBoxOutlineBlankIcon fontSize="small" />}
|
||
|
checkedIcon={<CheckBoxIcon fontSize="small" />}
|
||
|
checked={selected}
|
||
|
/>
|
||
|
{option.label}
|
||
|
</li>
|
||
|
);
|