fix: sidenav items overlapping in small screens (#4789)

This commit is contained in:
Vikrant Gupta 2024-04-02 12:38:10 +05:30 committed by GitHub
parent 3babce3ecf
commit 7a7d814288
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 138 additions and 105 deletions

View File

@ -78,8 +78,22 @@
box-shadow: none !important;
}
}
.nav-wrapper {
height: calc(100% - 52px);
.primary-nav-items {
max-height: 65%;
overflow-y: auto;
overflow-x: hidden;
&::-webkit-scrollbar {
width: 0.1rem;
}
}
.secondary-nav-items {
max-height: 35%;
overflow-y: auto;
overflow-x: hidden;
border-top: 1px solid var(--bg-slate-400);
padding: 8px 0;
max-width: 100%;
@ -90,7 +104,9 @@
transition: all 0.3s, background 0s, border 0s;
// position: relative;
&::-webkit-scrollbar {
width: 0.1rem;
}
.collapse-expand-handlers {
position: absolute;
@ -109,6 +125,19 @@
}
}
}
}
.nav-wrapper-cloud {
height: calc(100% - 88px);
.secondary-nav-items {
max-height: 30%;
}
.primary-nav-items {
max-height: 70%;
}
}
&.collapsed {
flex: 0 0 64px;
@ -157,6 +186,7 @@
}
}
.nav-wrapper {
.secondary-nav-items {
border-top: 1px solid var(--bg-vanilla-400);
@ -169,3 +199,4 @@
}
}
}
}

View File

@ -375,6 +375,7 @@ function SideNav({
</div>
)}
<div className={cx(`nav-wrapper`, isCloudUserVal && 'nav-wrapper-cloud')}>
<div className="primary-nav-items">
{menuItems.map((item, index) => (
<NavItem
@ -462,6 +463,7 @@ function SideNav({
</div>
</div>
</div>
</div>
);
}