42 lines
969 B
TypeScript
42 lines
969 B
TypeScript
"use client"
|
|
|
|
import { IconCirclePlusFilled, IconMail, type Icon } from "@tabler/icons-react"
|
|
|
|
import { Button } from "@/components/ui/button"
|
|
import {
|
|
SidebarGroup,
|
|
SidebarGroupContent,
|
|
SidebarMenu,
|
|
SidebarMenuButton,
|
|
SidebarMenuItem,
|
|
} from "@/components/ui/sidebar"
|
|
import Link from "next/link"
|
|
|
|
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}>
|
|
<Link href={item.url}>
|
|
<SidebarMenuButton tooltip={item.title}>
|
|
{item.icon && <item.icon />}
|
|
<span>{item.title}</span>
|
|
</SidebarMenuButton></Link>
|
|
</SidebarMenuItem>
|
|
))}
|
|
</SidebarMenu>
|
|
</SidebarGroupContent>
|
|
</SidebarGroup>
|
|
)
|
|
}
|