import * as React from 'react'; import Box from '@mui/material/Box'; import Drawer from '@mui/material/Drawer'; import Button from '@mui/material/Button'; import List from '@mui/material/List'; import Divider from '@mui/material/Divider'; import ListItem from '@mui/material/ListItem'; import ListItemButton from '@mui/material/ListItemButton'; import ListItemIcon from '@mui/material/ListItemIcon'; import ListItemText from '@mui/material/ListItemText'; import InboxIcon from '@mui/icons-material/MoveToInbox'; import MailIcon from '@mui/icons-material/Mail'; export default function AnchorTemporaryDrawer() { const [state, setState] = React.useState({ top: false, left: false, bottom: false, right: false, }); const toggleDrawer = (anchor, open) => (event) => { if (event.type === 'keydown' && (event.key === 'Tab' || event.key === 'Shift')) { return; } setState({ ...state, [anchor]: open }); }; const list = (anchor) => ( {['Inbox', 'Starred', 'Send email', 'Drafts'].map((text, index) => ( {index % 2 === 0 ? : } ))} {['All mail', 'Trash', 'Spam'].map((text, index) => ( {index % 2 === 0 ? : } ))} ); return (
{['left', 'right', 'top', 'bottom'].map((anchor) => ( {list(anchor)} ))}
); }