Skip to content

Commit 41df5c7

Browse files
authored
fix: add burger menu close (#1943)
1 parent a2748d3 commit 41df5c7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

apps/namadillo/src/App/Layout/AppLayout.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { AlphaVersionTopHeader } from "App/Common/AlphaVersionTopHeader";
22
import { ReactNode, useState } from "react";
3+
import { IoMdClose } from "react-icons/io";
34
import { twMerge } from "tailwind-merge";
45
import { AppHeader } from "./AppHeader";
56
import { BurgerButton } from "./BurgerButton";
@@ -41,6 +42,15 @@ export const AppLayout = ({
4142
!displayNavigation && "-translate-x-full lg:translate-x-0"
4243
)}
4344
>
45+
{displayNavigation && (
46+
<button
47+
className="absolute top-4 left-4 text-white hover:text-yellow text-2xl"
48+
onClick={() => setDisplayNavigation(false)}
49+
aria-label="Close Navigation"
50+
>
51+
<IoMdClose />
52+
</button>
53+
)}
4454
<Navigation />
4555
</aside>
4656
<main className="min-h-full">{children}</main>

0 commit comments

Comments
 (0)