/** * Sidebar 侧边栏导航组件 (桌面端) * 设计稿参考: UIDesignSpec.md 3.7 */ import React from 'react'; import { LucideIcon } from 'lucide-react'; export interface SidebarItem { id: string; label: string; icon: LucideIcon; href?: string; badge?: number; children?: SidebarItem[]; } export interface SidebarSection { title?: string; items: SidebarItem[]; } export interface SidebarProps { logo?: React.ReactNode; sections: SidebarSection[]; activeId: string; onItemClick?: (id: string) => void; footer?: React.ReactNode; className?: string; } export const Sidebar: React.FC = ({ logo, sections, activeId, onItemClick, footer, className = '', }) => { return ( ); }; interface SidebarNavItemProps { item: SidebarItem; isActive: boolean; onClick: () => void; } const SidebarNavItem: React.FC = ({ item, isActive, onClick, }) => { const Icon = item.icon; return (
  • ); }; export default Sidebar;