From 4062a09c05e72ebeb4fbfefa2007e748b2c9a588 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Mon, 20 May 2024 12:07:00 -0500 Subject: [PATCH] feat: aeson navbar --- src/components/Navbar/index.tsx | 88 +++++++++++++++------------------ 1 file changed, 41 insertions(+), 47 deletions(-) diff --git a/src/components/Navbar/index.tsx b/src/components/Navbar/index.tsx index 8a4f81a72..56e6091fc 100644 --- a/src/components/Navbar/index.tsx +++ b/src/components/Navbar/index.tsx @@ -14,7 +14,6 @@ import { IconButton, Link as LinkRadix, Popover, - ScrollArea, Spinner, Text, } from '@radix-ui/themes'; @@ -38,7 +37,7 @@ export const NAVBAR_HEIGHT = 64; export default function Navbar() { const wideFormat = useWideFormat(480); const login = useApp((state) => state.login); - const [showHamburgerMenu, setShowHamburgerMenu] = useState(false); + const [showHamburgerMenu, setShowHamburgerMenu] = useState(true); useEffect(() => { if (!login) return; @@ -93,20 +92,17 @@ export default function Navbar() { top: 0, left: 0, width: '100%', - height: showHamburgerMenu ? 176 : NAVBAR_HEIGHT + 1, // extra pixel for frost bleeding + maxHeight: showHamburgerMenu ? '100%' : NAVBAR_HEIGHT + 1, // extra pixel for frost bleeding zIndex: 2, padding: '1rem', background: theme.colors.appBackground1_alpha, borderBottom: theme.borderStyles.nonInteractive, backdropFilter: 'blur(4rem)', boxSizing: 'border-box', - transition: 'height 0.2s ease', + transition: 'max-height 0.5s ease', overflow: 'hidden', }} - onPointerEnter={() => { - console.log('open!'); - setShowHamburgerMenu(true); - }} + onPointerEnter={() => setShowHamburgerMenu(true)} onPointerLeave={() => setShowHamburgerMenu(false)} > @@ -204,49 +200,47 @@ export default function Navbar() { )} - - - {TOOLS.filter((tool) => !tool.href).map((tool) => ( - + {TOOLS.filter((tool) => !tool.href).map((tool) => ( + setShowHamburgerMenu(false)} + > + setShowHamburgerMenu(false)} > - - {tool.title} - - - ))} - - + {tool.title} + + + ))} +