2024-11-13 08:33:48 +01:00
|
|
|
import type { JSX } from 'react'
|
2024-07-27 11:33:34 +02:00
|
|
|
import { AppShell, Burger, Button, Flex } from '@mantine/core'
|
|
|
|
|
import { Link, useRouter } from 'tuono'
|
2024-11-13 08:33:48 +01:00
|
|
|
|
2024-07-27 11:33:34 +02:00
|
|
|
import Actions from './actions'
|
|
|
|
|
|
|
|
|
|
interface NavbarProps {
|
|
|
|
|
opened: boolean
|
|
|
|
|
toggle: () => void
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default function Navbar({ opened, toggle }: NavbarProps): JSX.Element {
|
|
|
|
|
const { pathname } = useRouter()
|
|
|
|
|
return (
|
|
|
|
|
<AppShell.Header p="sm">
|
|
|
|
|
<Flex justify="space-between">
|
2024-08-14 14:45:47 +02:00
|
|
|
<Button component={Link} href="/" variant="transparent" p={0} fz={28}>
|
|
|
|
|
Tuono
|
|
|
|
|
</Button>
|
2024-07-27 11:33:34 +02:00
|
|
|
<Flex align="center" gap={8}>
|
2024-08-14 14:45:47 +02:00
|
|
|
<Actions />
|
2024-07-27 11:33:34 +02:00
|
|
|
{pathname.startsWith('/documentation') && (
|
|
|
|
|
<Burger
|
|
|
|
|
opened={opened}
|
|
|
|
|
onClick={toggle}
|
|
|
|
|
hiddenFrom="sm"
|
|
|
|
|
size="sm"
|
|
|
|
|
/>
|
|
|
|
|
)}
|
|
|
|
|
</Flex>
|
|
|
|
|
</Flex>
|
|
|
|
|
</AppShell.Header>
|
|
|
|
|
)
|
|
|
|
|
}
|