1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Highlight only collapsed sidebar item

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2023-02-06 12:41:16 +03:00
parent 06fd0e2b37
commit f2534b1e06
2 changed files with 20 additions and 5 deletions

View File

@ -84,6 +84,7 @@ class NonInjectedSidebarItem extends React.Component<
data-is-active-test={this.isActive} data-is-active-test={this.isActive}
data-parent-id-test={this.registration.parentId} data-parent-id-test={this.registration.parentId}
data-expandable={this.isExpandable} data-expandable={this.isExpandable}
aria-expanded={this.expanded}
> >
<NavLink <NavLink
to={""} to={""}

View File

@ -5,6 +5,18 @@
width: 100%; width: 100%;
user-select: none; user-select: none;
// Do not highlight active state when item expanded
&[aria-expanded='true'] {
> .navItem:global(.active) {
background-color: transparent;
color: var(--textColorPrimary);
}
>.navItem:hover {
background: var(--sidebarLogoBackground);
}
}
> .navItem { > .navItem {
display: flex; display: flex;
gap: 8px; gap: 8px;
@ -34,10 +46,12 @@
.subMenu { .subMenu {
.SidebarItem { .SidebarItem {
&[data-expandable="true"] { &[data-expandable="true"] {
> .navItem > span { > .navItem {
font-weight: bolder; > span {
color: var(--textColorAccent); font-weight: bolder;
opacity: 0.6; color: var(--textColorAccent);
opacity: 0.7;
}
} }
} }