mirror of
https://github.com/tuono-labs/tuono
synced 2026-07-29 13:52:46 -07:00
33 lines
846 B
TypeScript
33 lines
846 B
TypeScript
|
|
import { AppShell, Burger, Button, Flex } from '@mantine/core'
|
||
|
|
import { Link, useRouter } from 'tuono'
|
||
|
|
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">
|
||
|
|
<Flex align="center" gap={8}>
|
||
|
|
{pathname.startsWith('/documentation') && (
|
||
|
|
<Burger
|
||
|
|
opened={opened}
|
||
|
|
onClick={toggle}
|
||
|
|
hiddenFrom="sm"
|
||
|
|
size="sm"
|
||
|
|
/>
|
||
|
|
)}
|
||
|
|
<Button component={Link} href="/" variant="transparent" p={0} fz={28}>
|
||
|
|
Tuono
|
||
|
|
</Button>
|
||
|
|
</Flex>
|
||
|
|
<Actions />
|
||
|
|
</Flex>
|
||
|
|
</AppShell.Header>
|
||
|
|
)
|
||
|
|
}
|