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-parent-id-test={this.registration.parentId}
data-expandable={this.isExpandable}
aria-expanded={this.expanded}
>
<NavLink
to={""}

View File

@ -5,6 +5,18 @@
width: 100%;
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 {
display: flex;
gap: 8px;
@ -34,11 +46,13 @@
.subMenu {
.SidebarItem {
&[data-expandable="true"] {
> .navItem > span {
font-weight: bolder;
color: var(--textColorAccent);
opacity: 0.6;
}
> .navItem {
> span {
font-weight: bolder;
color: var(--textColorAccent);
opacity: 0.7;
}
}
}
.navItem {