web-humas-fe/components/navbar/HumasNavbarWrapper.tsx

63 lines
2.6 KiB
TypeScript
Raw Normal View History

2024-03-07 03:33:43 +00:00
'use client'
2024-03-11 15:46:08 +00:00
import { Navbar, NavbarBrand, NavbarContent, NavbarItem } from '@nextui-org/navbar';
import { Avatar, Dropdown, DropdownItem, DropdownMenu, DropdownTrigger, ScrollShadow } from '@nextui-org/react';
2024-03-07 03:33:43 +00:00
import React from 'react'
import { ThemeSwitch } from '../theme-switch';
2024-03-11 15:46:08 +00:00
import Link from 'next/link';
2024-03-07 03:33:43 +00:00
interface Props {
children: React.ReactNode;
pageTitle?: string;
}
export default function HumasNavbarWrapper({ children }: Props) {
return (
2024-03-11 15:46:08 +00:00
<div className='w-full relative overflow-y-auto overflow-x-hidden'>
<Navbar maxWidth='full' className='dark:text-white bg-slate-200 dark:bg-[#182237]'
2024-03-07 03:33:43 +00:00
isBordered
classNames={{
2024-03-11 15:46:08 +00:00
wrapper: "p-2"
}}
>
<NavbarContent>
<NavbarItem>
Judul
</NavbarItem>
</NavbarContent>
<NavbarContent as="div" justify="end" className='pr-2'>
2024-03-07 03:33:43 +00:00
<Dropdown placement="bottom-end">
<DropdownTrigger>
<Avatar
isBordered
as="button"
className="transition-transform"
color="secondary"
name="Jason Hughes"
size="sm"
src="https://i.pravatar.cc/150?u=a042581f4e29026704d"
/>
</DropdownTrigger>
<DropdownMenu aria-label="Profile Actions" variant="flat">
<DropdownItem key="profile" className="h-14 gap-2">
<p className="font-semibold">Signed in as</p>
<p className="font-semibold">zoey@example.com</p>
</DropdownItem>
<DropdownItem key="settings">My Settings</DropdownItem>
2024-03-11 15:46:08 +00:00
<DropdownItem key="help_and_feedback">Help & Feedback</DropdownItem>
2024-03-07 03:33:43 +00:00
<DropdownItem key="logout" color="danger">
Log Out
</DropdownItem>
2024-03-11 15:46:08 +00:00
<DropdownItem>
<ThemeSwitch />
</DropdownItem>
2024-03-07 03:33:43 +00:00
</DropdownMenu>
</Dropdown>
</NavbarContent>
</Navbar>
2024-03-11 15:46:08 +00:00
<div className='p-2'>
{children}
</div>
2024-03-07 03:33:43 +00:00
</div>
)
}