{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "v0-sidebar-11", "type": "registry:internal", "author": "shadcn (https://ui.shadcn.com)", "registryDependencies": [ "sidebar", "breadcrumb", "separator", "collapsible" ], "files": [ { "path": "internal/sidebar-11.tsx", "content": "import * as React from \"react\"\nimport { ChevronRight, File, Folder } from \"lucide-react\"\n\nimport {\n Breadcrumb,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbList,\n BreadcrumbPage,\n BreadcrumbSeparator,\n} from \"@/components/ui/breadcrumb\"\nimport {\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n} from \"@/components/ui/collapsible\"\nimport { Separator } from \"@/components/ui/separator\"\nimport {\n Sidebar,\n SidebarContent,\n SidebarGroup,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarInset,\n SidebarMenu,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSub,\n SidebarProvider,\n SidebarRail,\n SidebarTrigger,\n} from \"@/components/ui/sidebar\"\n\n// This is sample data.\nconst data = {\n changes: [\n {\n file: \"README.md\",\n state: \"M\",\n },\n {\n file: \"api/hello/route.ts\",\n state: \"U\",\n },\n {\n file: \"app/layout.tsx\",\n state: \"M\",\n },\n ],\n tree: [\n [\n \"app\",\n [\n \"api\",\n [\"hello\", [\"route.ts\"]],\n \"page.tsx\",\n \"layout.tsx\",\n [\"blog\", [\"page.tsx\"]],\n ],\n ],\n [\n \"components\",\n [\"ui\", \"button.tsx\", \"card.tsx\"],\n \"header.tsx\",\n \"footer.tsx\",\n ],\n [\"lib\", [\"util.ts\"]],\n [\"public\", \"favicon.ico\", \"vercel.svg\"],\n \".eslintrc.json\",\n \".gitignore\",\n \"next.config.js\",\n \"tailwind.config.js\",\n \"package.json\",\n \"README.md\",\n ],\n}\n\nexport default function Page() {\n return (\n \n \n \n
\n \n \n \n \n \n components\n \n \n \n ui\n \n \n \n button.tsx\n \n \n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n \n )\n}\n\nfunction AppSidebar({ ...props }: React.ComponentProps) {\n return (\n \n \n \n Changes\n \n \n {data.changes.map((item, index) => (\n \n \n \n {item.file}\n \n {item.state}\n \n ))}\n \n \n \n \n Files\n \n \n {data.tree.map((item, index) => (\n \n ))}\n \n \n \n \n \n \n )\n}\n\nfunction Tree({ item }: { item: string | any[] }) {\n const [name, ...items] = Array.isArray(item) ? item : [item]\n\n if (!items.length) {\n return (\n \n \n {name}\n \n )\n }\n\n return (\n \n button>svg:first-child]:rotate-90\"\n defaultOpen={name === \"components\" || name === \"ui\"}\n >\n \n \n \n \n {name}\n \n \n \n \n {items.map((subItem, index) => (\n \n ))}\n \n \n \n \n )\n}\n", "type": "registry:internal", "target": "" } ] }