import * as React from 'react'; import Checkbox from '@mui/joy/Checkbox'; import List from '@mui/joy/List'; import ListItem from '@mui/joy/ListItem'; import ListItemDecorator from '@mui/joy/ListItemDecorator'; import LaptopIcon from '@mui/icons-material/Laptop'; import TvIcon from '@mui/icons-material/Tv'; import PhoneAndroidIcon from '@mui/icons-material/PhoneAndroid'; export default function ExampleButtonCheckbox() { const [value, setValue] = React.useState([]); return ( {['Mobile', 'Laptop', 'Monitor'].map((item) => ( { { Mobile: , Laptop: , Monitor: , }[item] } ) => { if (event.target.checked) { setValue((val) => [...val, item]); } else { setValue((val) => val.filter((text) => text !== item)); } }} slotProps={{ action: ({ checked }) => ({ sx: { bgcolor: checked ? 'background.level1' : 'transparent', boxShadow: checked ? 'sm' : 'none', }, }), }} /> ))} ); }