"use client" import * as React from "react" import { Collapsible, CollapsibleContent, CollapsibleTrigger, } from "@/registry/bases/base/ui/collapsible" import { Sidebar, SidebarContent, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuButton, SidebarMenuItem, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarTrigger, } from "@/registry/bases/base/ui/sidebar" import { IconPlaceholder } from "@/app/(create)/components/icon-placeholder" export default function SidebarInsetExample() { const data = { navMain: [ { title: "Dashboard", url: "#", icon: ( ), isActive: true, items: [ { title: "Overview", url: "#", }, { title: "Analytics", url: "#", }, ], }, { title: "Analytics", url: "#", icon: ( ), items: [ { title: "Reports", url: "#", }, { title: "Metrics", url: "#", }, ], }, { title: "Orders", url: "#", icon: ( ), items: [ { title: "All Orders", url: "#", }, { title: "Pending", url: "#", }, { title: "Completed", url: "#", }, ], }, { title: "Products", url: "#", icon: ( ), items: [ { title: "All Products", url: "#", }, { title: "Categories", url: "#", }, ], }, { title: "Invoices", url: "#", icon: ( ), }, { title: "Customers", url: "#", icon: ( ), }, { title: "Settings", url: "#", icon: ( ), }, ], navSecondary: [ { title: "Support", url: "#", icon: ( ), }, { title: "Feedback", url: "#", icon: ( ), }, ], } return ( Dashboard {data.navMain.map((item) => ( } > } isActive={item.isActive} > {item.icon} {item.title} {item.items?.length ? ( <> } > Toggle {item.items.map((subItem) => ( } > {subItem.title} ))} ) : null} ))} {data.navSecondary.map((item) => ( } size="sm"> {item.icon} {item.title} ))}
) }