Skip to content

Commit 1bc4a83

Browse files
committed
refactor: enhance sidebar spacer behavior for expanded and collapsed states in DashboardLayout component
1 parent 9d0986a commit 1bc4a83

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

services/frontend/src/components/DashboardLayout.vue

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,14 @@ const sidebarStyle = computed(() => ({
5858
width: 100%;
5959
}
6060
61-
/* Ensure the spacer div actually takes up space */
62-
.group\/sidebar-wrapper .group.peer [class*="w-[--sidebar-width]"] {
63-
width: var(--sidebar-width) !important;
61+
/* Ensure the spacer div actually takes up space when expanded */
62+
.group\/sidebar-wrapper .group.peer[data-state="expanded"] [class*="w-[--sidebar-width]"] {
63+
width: var(--sidebar-width);
64+
}
65+
66+
/* Allow the spacer to collapse when sidebar is collapsed */
67+
.group\/sidebar-wrapper .group.peer[data-state="collapsed"] [class*="w-[--sidebar-width]"] {
68+
width: var(--sidebar-width-icon);
6469
}
6570
6671
/* Force the main content to account for sidebar space */

0 commit comments

Comments
 (0)