2025-07-27 10:05:37 -07:00
|
|
|
"use client";
|
2025-04-07 23:47:06 -07:00
|
|
|
|
2025-07-27 10:05:37 -07:00
|
|
|
import type { LucideIcon } from "lucide-react";
|
2025-07-27 10:41:15 -07:00
|
|
|
import type * as React from "react";
|
2025-04-07 23:47:06 -07:00
|
|
|
|
|
|
|
|
import {
|
2025-07-27 10:05:37 -07:00
|
|
|
SidebarGroup,
|
2025-07-27 10:41:15 -07:00
|
|
|
SidebarGroupLabel,
|
2025-07-27 10:05:37 -07:00
|
|
|
SidebarMenu,
|
|
|
|
|
SidebarMenuButton,
|
|
|
|
|
SidebarMenuItem,
|
|
|
|
|
} from "@/components/ui/sidebar";
|
2025-04-07 23:47:06 -07:00
|
|
|
|
|
|
|
|
export function NavSecondary({
|
2025-07-27 10:05:37 -07:00
|
|
|
items,
|
|
|
|
|
...props
|
2025-04-07 23:47:06 -07:00
|
|
|
}: {
|
2025-07-27 10:05:37 -07:00
|
|
|
items: {
|
|
|
|
|
title: string;
|
|
|
|
|
url: string;
|
|
|
|
|
icon: LucideIcon;
|
|
|
|
|
}[];
|
2025-04-07 23:47:06 -07:00
|
|
|
} & React.ComponentPropsWithoutRef<typeof SidebarGroup>) {
|
2025-07-27 10:05:37 -07:00
|
|
|
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>
|
|
|
|
|
);
|
2025-04-07 23:47:06 -07:00
|
|
|
}
|