feat: add tooltips to sidebar icons

This commit is contained in:
CyberL1 2025-01-16 17:23:18 +01:00
parent 17c2a3042f
commit f1b7e063bb

View File

@ -16,6 +16,7 @@ import {
ListItemText,
ThemeProvider,
Toolbar,
Tooltip,
Typography,
} from "@mui/material";
import * as Icons from "@mui/icons-material";
@ -86,20 +87,22 @@ function App({ error }: { error?: boolean }) {
<Toolbar />
<List>
{sidebarItems.map((item) => (
<ListItem
key={item.title}
component={Link}
to={item.href}
target={item.openInNewTab ? "_blank" : "_self"}
disablePadding
>
<ListItemButton>
<ListItemIcon>
<Icon component={Icons[item.icon]} />
</ListItemIcon>
<ListItemText primary={item.title} />
</ListItemButton>
</ListItem>
<Tooltip title={item.title} placement="left" arrow>
<ListItem
key={item.title}
component={Link}
to={item.href}
target={item.openInNewTab ? "_blank" : "_self"}
disablePadding
>
<ListItemButton>
<ListItemIcon>
<Icon component={Icons[item.icon]} />
</ListItemIcon>
<ListItemText primary={item.title} />
</ListItemButton>
</ListItem>
</Tooltip>
))}
</List>
</Drawer>