Skip to content

Commit

Permalink
fix: layout menu mini size
Browse files Browse the repository at this point in the history
  • Loading branch information
Jadapema committed Nov 18, 2024
1 parent bd78419 commit c49f4f8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/layouts/config-layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ export const HEADER = {
export const NAV = {
W_VERTICAL: 260,
W_MINI: 72,
W_VERTICAL_MINI: 72 + 25,
};
2 changes: 1 addition & 1 deletion src/layouts/dashboard/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export default function Header({ onOpenNav }: Props) {
height: HEADER.H_DESKTOP_OFFSET,
}),
...(isNavMini && {
width: `calc(100% - ${NAV.W_MINI * 2 + 1}px)`,
width: `calc(100% - ${NAV.W_MINI + NAV.W_VERTICAL_MINI}px)`,
}),
}),

Expand Down
4 changes: 2 additions & 2 deletions src/layouts/dashboard/nav-vertical-mini.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function NavVerticalMini() {
component="nav"
sx={{
flexShrink: { lg: 0 },
width: { lg: NAV.W_MINI + 25 },
width: { lg: NAV.W_VERTICAL_MINI },
}}
>
<NavToggleButton
Expand All @@ -39,7 +39,7 @@ export default function NavVerticalMini() {
pb: 2,
height: 1,
position: 'fixed',
width: NAV.W_MINI + 25 ,
width: NAV.W_VERTICAL_MINI ,
borderRight: (theme) => `dashed 1px ${theme.palette.divider}`,
...hideScroll.x,
}}
Expand Down

0 comments on commit c49f4f8

Please sign in to comment.