migrate LibraryOptions to Mui 5 (#83)

This commit is contained in:
Aria Moradi
2021-11-15 19:33:04 +03:30
committed by GitHub
parent 6f86f0514b
commit 556d7086d1

View File

@@ -11,16 +11,17 @@ import FilterListIcon from '@mui/icons-material/FilterList';
import { Drawer, FormControlLabel, IconButton } from '@mui/material';
import useLibraryOptions from 'util/useLibraryOptions';
import ThreeStateCheckbox from 'components/util/ThreeStateCheckbox';
import { Box } from '@mui/system';
function Options() {
const {
downloaded, setDownloaded, unread, setUnread,
} = useLibraryOptions();
return (
<div style={{ display: 'flex', flexDirection: 'column' }}>
<Box sx={{ display: 'flex', flexDirection: 'column' }}>
<FormControlLabel control={<ThreeStateCheckbox name="Unread" checked={unread} onChange={setUnread} />} label="Unread" />
<FormControlLabel control={<ThreeStateCheckbox name="Downloaded" checked={downloaded} onChange={setDownloaded} />} label="Downloaded" />
</div>
</Box>
);
}