Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions frontend/src/components/layout/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ import { getNavItems } from "./NavConfig";

export const DRAWER_WIDTH = 240;

// Tighter than MUI's 56px default so the drawer icons sit closer to their labels.
const navIconSx = { minWidth: 40 } as const;

interface SidebarProps {
mobileOpen: boolean;
onMobileClose: () => void;
Expand Down Expand Up @@ -61,7 +64,7 @@ export function Sidebar({ mobileOpen, onMobileClose, unreadCount }: SidebarProps
},
}}
>
<ListItemIcon sx={{ minWidth: 40 }}>{item.icon}</ListItemIcon>
<ListItemIcon sx={navIconSx}>{item.icon}</ListItemIcon>
<ListItemText
primary={item.label}
slotProps={{ primary: { sx: { fontWeight: isActive(item.path) ? 700 : 500 } } }}
Expand All @@ -77,7 +80,7 @@ export function Sidebar({ mobileOpen, onMobileClose, unreadCount }: SidebarProps
<List dense>
<ListItem disablePadding>
<ListItemButton component={Link} to="/docs" onClick={onMobileClose}>
<ListItemIcon sx={{ minWidth: 40 }}>
<ListItemIcon sx={navIconSx}>
<MenuBook fontSize="small" />
</ListItemIcon>
<ListItemText primary="Docs" />
Expand All @@ -89,7 +92,7 @@ export function Sidebar({ mobileOpen, onMobileClose, unreadCount }: SidebarProps

{user ? (
<ListItemButton onClick={onLogout}>
<ListItemIcon sx={{ minWidth: 40 }}>
<ListItemIcon sx={navIconSx}>
<Logout fontSize="small" />
</ListItemIcon>
<ListItemText primary="Log out" />
Expand Down
Loading