Some checks failed
No response / noResponse (push) Has been cancelled
CI / Continuous releases (push) Has been cancelled
CI / test-dev (macos-latest) (push) Has been cancelled
CI / test-dev (ubuntu-latest) (push) Has been cancelled
CI / test-dev (windows-latest) (push) Has been cancelled
Maintenance / main (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
58 lines
1.8 KiB
JavaScript
58 lines
1.8 KiB
JavaScript
import * as React from 'react';
|
|
import Box from '@mui/material/Box';
|
|
import List from '@mui/material/List';
|
|
import ListItemButton from '@mui/material/ListItemButton';
|
|
import ListItemIcon from '@mui/material/ListItemIcon';
|
|
import ListItemText from '@mui/material/ListItemText';
|
|
import Divider from '@mui/material/Divider';
|
|
import InboxIcon from '@mui/icons-material/Inbox';
|
|
import DraftsIcon from '@mui/icons-material/Drafts';
|
|
|
|
export default function SelectedListItem() {
|
|
const [selectedIndex, setSelectedIndex] = React.useState(1);
|
|
|
|
const handleListItemClick = (event, index) => {
|
|
setSelectedIndex(index);
|
|
};
|
|
|
|
return (
|
|
<Box sx={{ width: '100%', maxWidth: 360, bgcolor: 'background.paper' }}>
|
|
<List component="nav" aria-label="main mailbox folders">
|
|
<ListItemButton
|
|
selected={selectedIndex === 0}
|
|
onClick={(event) => handleListItemClick(event, 0)}
|
|
>
|
|
<ListItemIcon>
|
|
<InboxIcon />
|
|
</ListItemIcon>
|
|
<ListItemText primary="Inbox" />
|
|
</ListItemButton>
|
|
<ListItemButton
|
|
selected={selectedIndex === 1}
|
|
onClick={(event) => handleListItemClick(event, 1)}
|
|
>
|
|
<ListItemIcon>
|
|
<DraftsIcon />
|
|
</ListItemIcon>
|
|
<ListItemText primary="Drafts" />
|
|
</ListItemButton>
|
|
</List>
|
|
<Divider />
|
|
<List component="nav" aria-label="secondary mailbox folder">
|
|
<ListItemButton
|
|
selected={selectedIndex === 2}
|
|
onClick={(event) => handleListItemClick(event, 2)}
|
|
>
|
|
<ListItemText primary="Trash" />
|
|
</ListItemButton>
|
|
<ListItemButton
|
|
selected={selectedIndex === 3}
|
|
onClick={(event) => handleListItemClick(event, 3)}
|
|
>
|
|
<ListItemText primary="Spam" />
|
|
</ListItemButton>
|
|
</List>
|
|
</Box>
|
|
);
|
|
}
|