Skip to content

Commit 0d58dd1

Browse files
authored
VSB-TUO/Admin sidebar submenu buttons clickable as block (#967)
* Making admin sidebar submenu items clickable as block * Added style for expandable-admin-sidebar-section to sidebar-sub-level-item-list's childs
1 parent c6afc16 commit 0d58dd1

3 files changed

Lines changed: 23 additions & 3 deletions

File tree

src/app/admin/admin-sidebar/admin-sidebar.component.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,15 @@
5656
padding-bottom: var(--ds-admin-sidebar-item-padding);
5757
}
5858

59+
// Remove vertical padding from the wrapper and apply it to the anchor
60+
// In case an anchor also has .sidebar-item, reset it to avoid double padding
61+
.sidebar-sub-level-item-list {
62+
.sidebar-item, .ds-menu-item.sidebar-item {
63+
padding-top: 0;
64+
padding-bottom: 0;
65+
}
66+
}
67+
5968
// These classes handle the collapsing behavior
6069
.sidebar-section-wrapper {
6170

src/app/admin/admin-sidebar/expandable-admin-sidebar-section/expandable-admin-sidebar-section.component.scss

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,19 @@
33
list-style: none;
44
margin: 0;
55
padding: 0;
6-
::ng-deep .ds-menu-item {
7-
margin-left: var(--ds-admin-sidebar-section-indent);
6+
/* Make the entire sub-level row clickable by applying padding to the anchor */
7+
::ng-deep {
8+
/* Ensure anchors are full-width blocks */
9+
.ds-menu-item {
10+
display: block;
11+
width: 100%;
12+
padding-left: var(--ds-admin-sidebar-section-indent);
13+
}
14+
15+
.sidebar-item .ds-menu-item {
16+
padding-top: var(--ds-admin-sidebar-item-padding);
17+
padding-bottom: var(--ds-admin-sidebar-item-padding);
18+
}
819
}
920
}
1021

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
a {
22
cursor: pointer;
3-
}
3+
}

0 commit comments

Comments
 (0)