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