siakad-itm/resources/js/components/nav-main.tsx
Yoga Pangestu fbf29ad4e9
Some checks failed
tests / ci (pull_request) Has been cancelled
feat: Refactor UI components and add new Drawer, Table, and Tabs components
- Removed unnecessary "use client" directive from checkbox and select components.
- Added new Drawer component with associated subcomponents (DrawerTrigger, DrawerClose, etc.) for better UI management.
- Introduced Table component with TableHeader, TableBody, TableFooter, TableRow, TableHead, TableCell, and TableCaption for structured data display.
- Added Tabs component with TabsList, TabsTrigger, and TabsContent for tabbed navigation.
- Updated user-info component to use full_name instead of name for better clarity.
- Modified user-menu-content to include translations for settings and logout options.
- Added data.json file for mock data in the dashboard.
- Updated dashboard page to utilize new components and improved layout.
- Refactored User type to replace name with full_name for consistency across the application.
2026-08-03 15:57:38 +07:00

37 lines
792 B
TypeScript

import { type Icon } from "@tabler/icons-react";
import {
SidebarGroup,
SidebarGroupContent,
SidebarMenu,
SidebarMenuButton,
SidebarMenuItem,
} from "@/components/ui/sidebar";
export function NavMain({
items,
}: {
items: {
title: string
url: string
icon?: Icon
}[]
}) {
return (
<SidebarGroup>
<SidebarGroupContent className="flex flex-col gap-2">
<SidebarMenu>
{items.map((item) => (
<SidebarMenuItem key={item.title}>
<SidebarMenuButton tooltip={item.title}>
{item.icon && <item.icon />}
<span>{item.title}</span>
</SidebarMenuButton>
</SidebarMenuItem>
))}
</SidebarMenu>
</SidebarGroupContent>
</SidebarGroup>
)
}