-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Shugo Kawamura
committed
Aug 12, 2023
1 parent
9729fa2
commit c586ebd
Showing
4 changed files
with
82 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,59 @@ | ||
'use client' | ||
|
||
import React from 'react'; | ||
import Drawer from '@mui/material/Drawer'; | ||
import Box from '@mui/material/Box'; | ||
import List from '@mui/material/List'; | ||
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 GroupsIcon from '@mui/icons-material/Groups'; | ||
import DnsIcon from '@mui/icons-material/Dns'; | ||
|
||
type menuListProps = { | ||
onSelected:(key:string) => void | ||
} | ||
|
||
const MenuList = (props:menuListProps) => { | ||
return ( | ||
<Box | ||
role="presentation" | ||
> | ||
<List> | ||
<ListItem disablePadding> | ||
<ListItemButton onClick={()=>{props.onSelected("matches")}}> | ||
<ListItemIcon> | ||
<GroupsIcon /> | ||
</ListItemIcon> | ||
<ListItemText primary="MATCHES" /> | ||
</ListItemButton> | ||
</ListItem> | ||
<ListItem disablePadding> | ||
<ListItemButton onClick={()=>{props.onSelected("servers")}}> | ||
<ListItemIcon> | ||
<DnsIcon /> | ||
</ListItemIcon> | ||
<ListItemText primary="SERVERS" /> | ||
</ListItemButton> | ||
</ListItem> | ||
</List> | ||
</Box> | ||
) | ||
}; | ||
|
||
function MenuDrawer() { | ||
const [selected, setSelected] = React.useState<string>("matches") | ||
return ( | ||
<Drawer open={true}> | ||
<MenuList onSelected={setSelected} /> | ||
{selected} | ||
</Drawer> | ||
) | ||
} | ||
|
||
export default function Home() { | ||
return ( | ||
<main> | ||
<h1>get5loader</h1> | ||
</main> | ||
<MenuDrawer /> | ||
) | ||
} |