'use client'; import Link from 'next/link'; import { usePathname } from 'next/navigation'; interface NavItem { title: string; href: string; items?: NavItem[]; } const navigation: NavItem[] = [ { title: '概览', href: '/', }, { title: '栅格系统', href: '/grid-system', }, { title: '核心组件', href: '/components', items: [ { title: 'Article', href: '/components/article' }, { title: 'Layer', href: '/components/layer' }, { title: '媒体组件', href: '/components/media' }, ], }, { title: '文本组件', href: '/text', }, { title: '主题系统', href: '/theme', }, { title: '示例', href: '/examples', items: [ { title: '跨栏布局', href: '/examples/spanning' }, { title: '响应式布局', href: '/examples/responsive' }, ], }, ]; export function Sidebar() { const pathname = usePathname(); return ( ); }