Skip to content

Commit

Permalink
[fix] add backdrop color on menu expand (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
jinkang-0 authored Jan 22, 2024
1 parent 049d445 commit b0abc62
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/components/Navbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ export default function NavBar({ links }: Props) {
</button>

{/* backdrop */}
<div className={styles.backdrop}></div>
<div
className={`${styles.backdrop} ${menuVisible ? styles.show : null}`}
></div>

{/* links */}
<section className={styles.links}>
Expand Down
8 changes: 7 additions & 1 deletion src/components/Navbar/style.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,15 @@ nav {
width: 100%;
height: 100%;
z-index: 9;
transition: 1s;

&.show {
background: white;
transition: 0s;
}

@media (min-width: breakpoints.$tablet) {
visibility: hidden;
background: none !important;
}
}

Expand Down

0 comments on commit b0abc62

Please sign in to comment.