mirror of
https://github.com/Qortal/chrome-extension.git
synced 2025-02-11 17:55:49 +00:00
fix drawer on mobile
This commit is contained in:
parent
86f3105586
commit
5433cf8e41
@ -11,6 +11,7 @@ import ListItemText from '@mui/material/ListItemText';
|
||||
import InboxIcon from '@mui/icons-material/MoveToInbox';
|
||||
import MailIcon from '@mui/icons-material/Mail';
|
||||
import CloseIcon from '@mui/icons-material/Close';
|
||||
import { isMobile } from '../../App';
|
||||
export const DrawerComponent = ({open, setOpen, children}) => {
|
||||
|
||||
const toggleDrawer = (newOpen: boolean) => () => {
|
||||
@ -21,7 +22,7 @@ export const DrawerComponent = ({open, setOpen, children}) => {
|
||||
return (
|
||||
<div>
|
||||
<Drawer open={open} onClose={toggleDrawer(false)}>
|
||||
<Box sx={{ width: 400, height: '100%' }} role="presentation">
|
||||
<Box sx={{ width: isMobile ? '100vw' : '400px', height: '100%' }} role="presentation">
|
||||
|
||||
{children}
|
||||
</Box>
|
||||
|
Loading…
x
Reference in New Issue
Block a user