165 lines
3.8 KiB
TypeScript
165 lines
3.8 KiB
TypeScript
"use client"
|
|
|
|
import * as React from "react"
|
|
import {
|
|
IconCamera,
|
|
IconChartBar,
|
|
IconDashboard,
|
|
IconDatabase,
|
|
IconFileAi,
|
|
IconFileDescription,
|
|
IconFileWord,
|
|
IconFolder,
|
|
IconHelp,
|
|
IconInnerShadowTop,
|
|
IconListDetails,
|
|
IconReport,
|
|
IconSearch,
|
|
IconSettings,
|
|
IconUsers,
|
|
} from "@tabler/icons-react"
|
|
|
|
import { NavMain } from "./nav-main"
|
|
|
|
import {
|
|
Sidebar,
|
|
SidebarContent,
|
|
SidebarFooter,
|
|
SidebarHeader,
|
|
SidebarMenu,
|
|
SidebarMenuButton,
|
|
SidebarMenuItem,
|
|
} from "@/components/ui/sidebar"
|
|
|
|
const data = {
|
|
user: {
|
|
name: "shadcn",
|
|
email: "m@example.com",
|
|
avatar: "/avatars/shadcn.jpg",
|
|
},
|
|
navMain: [
|
|
{
|
|
title: "Dashboard",
|
|
url: "/admin/dashboard",
|
|
icon: IconDashboard,
|
|
},
|
|
{
|
|
title: "Analytics",
|
|
url: "/admin/analytics",
|
|
icon: IconChartBar,
|
|
},
|
|
{
|
|
title: "Users",
|
|
url: "/admin/users",
|
|
icon: IconUsers,
|
|
}
|
|
],
|
|
navClouds: [
|
|
{
|
|
title: "Capture",
|
|
icon: IconCamera,
|
|
isActive: true,
|
|
url: "#",
|
|
items: [
|
|
{
|
|
title: "Active Proposals",
|
|
url: "#",
|
|
},
|
|
{
|
|
title: "Archived",
|
|
url: "#",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
title: "Proposal",
|
|
icon: IconFileDescription,
|
|
url: "#",
|
|
items: [
|
|
{
|
|
title: "Active Proposals",
|
|
url: "#",
|
|
},
|
|
{
|
|
title: "Archived",
|
|
url: "#",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
title: "Prompts",
|
|
icon: IconFileAi,
|
|
url: "#",
|
|
items: [
|
|
{
|
|
title: "Active Proposals",
|
|
url: "#",
|
|
},
|
|
{
|
|
title: "Archived",
|
|
url: "#",
|
|
},
|
|
],
|
|
},
|
|
],
|
|
navSecondary: [
|
|
{
|
|
title: "Settings",
|
|
url: "#",
|
|
icon: IconSettings,
|
|
},
|
|
{
|
|
title: "Get Help",
|
|
url: "#",
|
|
icon: IconHelp,
|
|
},
|
|
{
|
|
title: "Search",
|
|
url: "#",
|
|
icon: IconSearch,
|
|
},
|
|
],
|
|
documents: [
|
|
{
|
|
name: "Data Library",
|
|
url: "#",
|
|
icon: IconDatabase,
|
|
},
|
|
{
|
|
name: "Reports",
|
|
url: "#",
|
|
icon: IconReport,
|
|
},
|
|
|
|
],
|
|
}
|
|
|
|
export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
|
|
const [nav, setNav] = React.useState(data.navMain)
|
|
|
|
return (
|
|
<Sidebar collapsible="offcanvas" {...props}>
|
|
<SidebarHeader>
|
|
<SidebarMenu>
|
|
<SidebarMenuItem>
|
|
<SidebarMenuButton
|
|
asChild
|
|
className="data-[slot=sidebar-menu-button]:!p-1.5"
|
|
>
|
|
<a href="#">
|
|
<IconInnerShadowTop className="!size-5" />
|
|
<span className="text-base font-semibold">Acme Inc.</span>
|
|
</a>
|
|
</SidebarMenuButton>
|
|
</SidebarMenuItem>
|
|
</SidebarMenu>
|
|
</SidebarHeader>
|
|
<SidebarContent>
|
|
<NavMain items={data.navMain} />
|
|
</SidebarContent>
|
|
<SidebarFooter>
|
|
</SidebarFooter>
|
|
</Sidebar>
|
|
)
|
|
}
|