chore: add disabled settings menu item (#1)

* chore: add disabled settings menu item

* ci: lint files
This commit is contained in:
Yuri Almeida
2022-10-18 21:59:13 -03:00
committed by rusconn
parent a06ea5bad9
commit b263b4fec8
2 changed files with 14 additions and 5 deletions

View File

@@ -13,4 +13,7 @@ A web clone of [DevToys](https://github.com/veler/DevToys)
- [x] Generators
- [ ] Text
- [ ] Graphic
- [ ] Support dark mode
- [ ] Settings
- [x] Settings menu item
- [ ] Support dark mode
- [ ] Support i18n

View File

@@ -1,4 +1,4 @@
import { Home } from "@mui/icons-material";
import { Home, Settings } from "@mui/icons-material";
import { Box, Divider, Drawer, List, Stack } from "@mui/material";
import { css } from "@mui/material/styles";
import { memo } from "react";
@@ -30,20 +30,26 @@ const divider = css`
border-color: rgba(0, 0, 0, 0.08);
`;
const fullHeight = { height: "100%" };
const StyledComponent = ({ toolGroups }: Props) => (
<Drawer variant="permanent" css={drawer}>
<Box paddingLeft={2} paddingRight={2} marginTop="1px">
<SearchBar />
</Box>
<List component="nav">
<Stack spacing={1}>
<DrawerItem icon={<Home />} title="All tools" href={pagesPath.$url()} />
<List component="nav" css={fullHeight}>
<Stack spacing={1} css={fullHeight}>
<Box>
<DrawerItem icon={<Home />} title="All tools" href={pagesPath.$url()} />
</Box>
<Divider css={divider} />
<Box>
{toolGroups.map(({ icon, title, tools }) => (
<DrawerCollapseItem key={title} {...{ icon, title, tools }} />
))}
</Box>
<Box flex={1} />
<DrawerItem icon={<Settings />} title="Settings" href="settings" disabled />
</Stack>
</List>
</Drawer>