Skip to content

Commit

Permalink
fix mobile menu button (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
JorgeX committed Sep 25, 2023
1 parent 93c2273 commit 5274a1d
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions packages/site/src/components/Header.astro
Expand Up @@ -4,13 +4,6 @@ import HeaderLink from './HeaderLink.astro';
let { headerText } = Astro.props;
---

<script>
const button = document.querySelector('#mobile-menu-button');
button!.addEventListener('click', () => {
const menu = document.querySelector('#mobile-menu');
menu!.classList.toggle('hidden');
});
</script>
<header>
<nav class="border-b border-gray-200 bg-white">
<div class="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
Expand Down Expand Up @@ -48,6 +41,7 @@ let { headerText } = Astro.props;
aria-controls="mobile-menu"
aria-expanded="false"
id="mobile-menu-button"
onclick="document.querySelector('#mobile-menu').classList.toggle('hidden')"
>
<span class="sr-only">Open main menu</span>
<!-- Menu open: "hidden", Menu closed: "block" -->
Expand Down

0 comments on commit 5274a1d

Please sign in to comment.