mirror of
https://github.com/MODSetter/SurfSense.git
synced 2025-09-02 10:39:13 +00:00
41 lines
850 B
TypeScript
41 lines
850 B
TypeScript
"use client";
|
|
|
|
import type { LucideIcon } from "lucide-react";
|
|
import type * as React from "react";
|
|
|
|
import {
|
|
SidebarGroup,
|
|
SidebarGroupLabel,
|
|
SidebarMenu,
|
|
SidebarMenuButton,
|
|
SidebarMenuItem,
|
|
} from "@/components/ui/sidebar";
|
|
|
|
export function NavSecondary({
|
|
items,
|
|
...props
|
|
}: {
|
|
items: {
|
|
title: string;
|
|
url: string;
|
|
icon: LucideIcon;
|
|
}[];
|
|
} & React.ComponentPropsWithoutRef<typeof SidebarGroup>) {
|
|
return (
|
|
<SidebarGroup {...props}>
|
|
<SidebarGroupLabel>SearchSpace</SidebarGroupLabel>
|
|
<SidebarMenu>
|
|
{items.map((item, index) => (
|
|
<SidebarMenuItem key={`${item.title}-${index}`}>
|
|
<SidebarMenuButton asChild size="sm">
|
|
<a href={item.url}>
|
|
<item.icon />
|
|
<span>{item.title}</span>
|
|
</a>
|
|
</SidebarMenuButton>
|
|
</SidebarMenuItem>
|
|
))}
|
|
</SidebarMenu>
|
|
</SidebarGroup>
|
|
);
|
|
}
|