Skip to content

Commit

Permalink
fix(sidenav): add a scrollbar when content overflows
Browse files Browse the repository at this point in the history
  • Loading branch information
bsahitya committed Jun 14, 2024
1 parent 19b8726 commit f45d84e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
22 changes: 10 additions & 12 deletions libs/react-components/src/lib/components/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -261,18 +261,16 @@ const Header: React.FC<HeaderProps> = ({
secondaryMenu?.menuElement ? { paddingTop: '6.5rem' } : {}
}
>
<div>
<div className={styles.sidenavHeader}>
<h3>{secondaryMenu?.title}</h3>
<img
src={closeIcon}
onClick={handleDocsIconClick}
alt="Docs Menu"
/>
</div>
<div className={styles.sidenavContent}>
{secondaryMenu?.menuElement}
</div>
<div className={styles.sidenavHeader}>
<h3>{secondaryMenu?.title}</h3>
<img
src={closeIcon}
onClick={handleDocsIconClick}
alt="Docs Menu"
/>
</div>
<div className={styles.sidenavContent}>
{secondaryMenu?.menuElement}
</div>
</Sidenav>
</aside>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,8 @@ body {

.sidenavContent {
padding: 1rem;
overflow: auto;
height: 100%;
}

@media screen and (min-width: 768px) and (max-width: 1024px) {
Expand Down

0 comments on commit f45d84e

Please sign in to comment.