feat: hamburger meny

This commit is contained in:
TrèsAbhi committed 2024-04-18 20:26:35 -05:00
1 parent 0a1e823ce4
commit 04107c10b7
1 file changed
+38 -2
+38 -2
View File
@@ -3,8 +3,15 @@ import {
HamburgerMenuIcon,
MagnifyingGlassIcon,
} from '@radix-ui/react-icons';
import { Flex, IconButton, Popover } from '@radix-ui/themes';
import {
Flex,
Heading,
IconButton,
Link as LinkRadix,
Popover,
} from '@radix-ui/themes';
import Link from 'next/link';
import { TOOLS } from '../../constants/tools';
import { useFullScreen } from '../../hooks/useFullScreen';
import { useWideFormat } from '../../hooks/useWideFormat';
import { BlitzkriegWormWide } from '../../icons/BlitzkriegWormWide';
@@ -77,7 +84,36 @@ export default function Navbar() {
</IconButton>
</Popover.Trigger>
<Popover.Content></Popover.Content>
<Popover.Content align="center">
<Flex direction="column" gap="2">
<Heading size="4">Tools</Heading>
<Flex direction="column" gap="1" pl="4">
{TOOLS.map((tool, index) => {
if (tool.href || tool.disabled) return null;
return (
<LinkRadix
tabIndex={-1}
href={`/tools/${tool.id}`}
onClick={(event) => event.preventDefault()}
>
<Link
href={`/tools/${tool.id}`}
key={index}
style={{
textDecoration: 'none',
color: 'inherit',
}}
>
{tool.title}
</Link>
</LinkRadix>
);
})}
</Flex>
</Flex>
</Popover.Content>
</Popover.Root>
<Link href="/settings">