mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-07-09 06:55:07 +00:00
* feat(www): add login blocks * chore(www): restructure for blocks * chore: build registry * chore: clean up chunks * fix(www): chart categories * feat(www): big registry refactor * feat(www): update blocks * feat: complex blocks * fix: update schema * feat: sync new-york and default * fix: lint * feat: move charts * fix(www): code * fix: src path * chore: rebuild registry * fix: screenshot * fix: set new-york as default
181 lines
3.4 KiB
TypeScript
181 lines
3.4 KiB
TypeScript
"use client"
|
|
|
|
import {
|
|
Sidebar,
|
|
SidebarContent,
|
|
SidebarGroup,
|
|
SidebarGroupContent,
|
|
SidebarMenu,
|
|
SidebarMenuButton,
|
|
SidebarMenuItem,
|
|
SidebarMenuSub,
|
|
SidebarMenuSubButton,
|
|
SidebarMenuSubItem,
|
|
SidebarProvider,
|
|
} from "@/registry/default/ui/sidebar"
|
|
|
|
const items = [
|
|
{
|
|
title: "Getting Started",
|
|
url: "#",
|
|
items: [
|
|
{
|
|
title: "Installation",
|
|
url: "#",
|
|
},
|
|
{
|
|
title: "Project Structure",
|
|
url: "#",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
title: "Building Your Application",
|
|
url: "#",
|
|
items: [
|
|
{
|
|
title: "Routing",
|
|
url: "#",
|
|
},
|
|
{
|
|
title: "Data Fetching",
|
|
url: "#",
|
|
isActive: true,
|
|
},
|
|
{
|
|
title: "Rendering",
|
|
url: "#",
|
|
},
|
|
{
|
|
title: "Caching",
|
|
url: "#",
|
|
},
|
|
{
|
|
title: "Styling",
|
|
url: "#",
|
|
},
|
|
{
|
|
title: "Optimizing",
|
|
url: "#",
|
|
},
|
|
{
|
|
title: "Configuring",
|
|
url: "#",
|
|
},
|
|
{
|
|
title: "Testing",
|
|
url: "#",
|
|
},
|
|
{
|
|
title: "Authentication",
|
|
url: "#",
|
|
},
|
|
{
|
|
title: "Deploying",
|
|
url: "#",
|
|
},
|
|
{
|
|
title: "Upgrading",
|
|
url: "#",
|
|
},
|
|
{
|
|
title: "Examples",
|
|
url: "#",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
title: "API Reference",
|
|
url: "#",
|
|
items: [
|
|
{
|
|
title: "Components",
|
|
url: "#",
|
|
},
|
|
{
|
|
title: "File Conventions",
|
|
url: "#",
|
|
},
|
|
{
|
|
title: "Functions",
|
|
url: "#",
|
|
},
|
|
{
|
|
title: "next.config.js Options",
|
|
url: "#",
|
|
},
|
|
{
|
|
title: "CLI",
|
|
url: "#",
|
|
},
|
|
{
|
|
title: "Edge Runtime",
|
|
url: "#",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
title: "Architecture",
|
|
url: "#",
|
|
items: [
|
|
{
|
|
title: "Accessibility",
|
|
url: "#",
|
|
},
|
|
{
|
|
title: "Fast Refresh",
|
|
url: "#",
|
|
},
|
|
{
|
|
title: "Next.js Compiler",
|
|
url: "#",
|
|
},
|
|
{
|
|
title: "Supported Browsers",
|
|
url: "#",
|
|
},
|
|
{
|
|
title: "Turbopack",
|
|
url: "#",
|
|
},
|
|
],
|
|
},
|
|
]
|
|
|
|
export default function AppSidebar() {
|
|
return (
|
|
<SidebarProvider>
|
|
<Sidebar>
|
|
<SidebarContent>
|
|
<SidebarGroup>
|
|
<SidebarGroupContent>
|
|
<SidebarMenu>
|
|
{items.map((item, index) => (
|
|
<SidebarMenuItem key={index}>
|
|
<SidebarMenuButton asChild>
|
|
<a href={item.url}>
|
|
<span>{item.title}</span>
|
|
</a>
|
|
</SidebarMenuButton>
|
|
<SidebarMenuSub>
|
|
{item.items.map((subItem, subIndex) => (
|
|
<SidebarMenuSubItem key={subIndex}>
|
|
<SidebarMenuSubButton asChild>
|
|
<a href={subItem.url}>
|
|
<span>{subItem.title}</span>
|
|
</a>
|
|
</SidebarMenuSubButton>
|
|
</SidebarMenuSubItem>
|
|
))}
|
|
</SidebarMenuSub>
|
|
</SidebarMenuItem>
|
|
))}
|
|
</SidebarMenu>
|
|
</SidebarGroupContent>
|
|
</SidebarGroup>
|
|
</SidebarContent>
|
|
</Sidebar>
|
|
</SidebarProvider>
|
|
)
|
|
}
|