Presupuestador_web/client/src/components/Layout/LayoutHeader.tsx

81 lines
3.2 KiB
TypeScript
Raw Normal View History

2024-08-09 14:50:25 +00:00
import { Button, Sheet, SheetContent, SheetTrigger } from "@/ui";
2024-06-09 20:04:46 +00:00
2024-08-09 14:50:25 +00:00
import { MenuIcon, Package2Icon } from "lucide-react";
2024-06-09 20:04:46 +00:00
import { Trans } from "react-i18next";
import { Link } from "react-router-dom";
import { UeckoLogo } from "../UeckoLogo";
2024-08-09 14:50:25 +00:00
import { UserButton } from "./components";
2024-06-09 20:04:46 +00:00
export const LayoutHeader = () => {
return (
2024-07-03 18:05:26 +00:00
<header className='sticky top-0 z-10 flex items-center h-16 gap-8 px-4 border-b bg-accent md:px-6'>
2024-06-09 20:04:46 +00:00
<nav className='flex-col hidden gap-6 text-lg font-medium md:flex md:flex-row md:items-center md:gap-5 md:text-sm lg:gap-6'>
<Link to='/' className='flex items-center font-semibold'>
<UeckoLogo className='w-24' />
<span className='sr-only'>Uecko</span>
</Link>
2024-07-03 18:05:26 +00:00
<Link to='/home' className='transition-colors text-muted-foreground hover:text-foreground'>
<Trans i18nKey='main_menu.home' />
</Link>
2024-06-09 20:04:46 +00:00
<Link
to='/quotes'
className='transition-colors text-muted-foreground hover:text-foreground'
>
<Trans i18nKey='main_menu.quotes' />
</Link>
<Link
to='/catalog'
className='transition-colors text-muted-foreground hover:text-foreground'
>
<Trans i18nKey='main_menu.catalog' />
</Link>
<Link
to='/dealers'
className='transition-colors text-muted-foreground hover:text-foreground'
>
<Trans i18nKey='main_menu.dealers' />
</Link>
<Link to='/settings' className='transition-colors text-foreground hover:text-foreground'>
<Trans i18nKey='main_menu.settings' />
</Link>
</nav>
<Sheet>
<SheetTrigger asChild>
<Button variant='outline' size='icon' className='shrink-0 md:hidden'>
<MenuIcon className='w-5 h-5' />
<span className='sr-only'>Toggle navigation menu</span>
</Button>
</SheetTrigger>
<SheetContent side='left'>
<nav className='grid gap-6 text-lg font-medium'>
<Link to='/' className='flex items-center gap-2 text-lg font-semibold'>
<Package2Icon className='w-6 h-6' />
<span className='sr-only'>Uecko</span>
</Link>
2024-07-03 18:05:26 +00:00
<Link to='/home' className='text-muted-foreground hover:text-foreground'>
<Trans i18nKey='main_menu.home' />
</Link>
2024-06-09 20:04:46 +00:00
<Link to='/quotes' className='text-muted-foreground hover:text-foreground'>
<Trans i18nKey='main_menu.quotes' />
</Link>
<Link to='/catalog' className='text-muted-foreground hover:text-foreground'>
<Trans i18nKey='main_menu.catalog' />
</Link>
<Link to='/dealers' className='text-muted-foreground hover:text-foreground'>
<Trans i18nKey='main_menu.dealers' />
</Link>
<Link to='/settings' className='hover:text-foreground'>
<Trans i18nKey='main_menu.settings' />
</Link>
</nav>
</SheetContent>
</Sheet>
2024-08-09 14:50:25 +00:00
<div className='flex items-center justify-end w-full gap-4 md:ml-auto md:gap-2 lg:gap-4'>
2024-06-09 20:04:46 +00:00
<UserButton />
</div>
</header>
);
};
LayoutHeader.displayName = "LayoutHeader";