-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
788bbe9
commit c3f6b20
Showing
21 changed files
with
1,363 additions
and
251 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
module.exports = { | ||
extends: ["@dcl/eslint-config/ui"], | ||
rules: { | ||
"import/group-exports": "off", | ||
"import/no-default-export": "off", | ||
"react/prop-types": "off", | ||
}, | ||
} |
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 |
---|---|---|
|
@@ -23,3 +23,5 @@ dist-ssr | |
*.sln | ||
*.sw? | ||
*.tsbuildinfo | ||
|
||
.env |
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
Large diffs are not rendered by default.
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
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1,80 @@ | ||
import { | ||
Box, | ||
Divider, | ||
Drawer, | ||
List, | ||
ListItemButton, | ||
ListItemIcon, | ||
ListItemText, | ||
Toolbar, | ||
} from "@mui/material" | ||
import SquidLogo from "../squid.svg?react" | ||
|
||
interface SidebarProps { | ||
drawerWidth: number | ||
mobileOpen: boolean | ||
handleDrawerToggle: () => void | ||
} | ||
|
||
const Sidebar: React.FC<SidebarProps> = ({ | ||
drawerWidth, | ||
mobileOpen, | ||
handleDrawerToggle, | ||
}) => { | ||
const drawer = ( | ||
<div> | ||
<Toolbar /> | ||
<Divider /> | ||
<List> | ||
<ListItemButton selected> | ||
<ListItemIcon> | ||
<SquidLogo width={24} height={24} fill="white" /> | ||
</ListItemIcon> | ||
<ListItemText | ||
primary="Squids" | ||
sx={{ fontWeight: 600, fontSize: "0.875rem" }} | ||
/> | ||
</ListItemButton> | ||
</List> | ||
</div> | ||
) | ||
|
||
return ( | ||
<Box | ||
component="nav" | ||
sx={{ width: { sm: drawerWidth }, flexShrink: { sm: 0 } }} | ||
aria-label="squid management options" | ||
> | ||
<Drawer | ||
variant="temporary" | ||
open={mobileOpen} | ||
onClose={handleDrawerToggle} | ||
ModalProps={{ keepMounted: true }} | ||
sx={{ | ||
display: { xs: "block", sm: "none" }, | ||
"& .MuiDrawer-paper": { | ||
boxSizing: "border-box", | ||
width: drawerWidth, | ||
}, | ||
}} | ||
> | ||
{drawer} | ||
</Drawer> | ||
<Drawer | ||
variant="permanent" | ||
sx={{ | ||
display: { xs: "none", sm: "block" }, | ||
"& .MuiDrawer-paper": { | ||
boxSizing: "border-box", | ||
width: drawerWidth, | ||
}, | ||
}} | ||
open | ||
> | ||
{drawer} | ||
</Drawer> | ||
</Box> | ||
) | ||
} | ||
|
||
export default Sidebar |
Oops, something went wrong.