generated from kevisual/vite-react-template
feat: 添加可折叠侧边栏布局,优化仓库列表和工作空间页面
This commit is contained in:
35
src/pages/sidebar/components/Sidebar.tsx
Normal file
35
src/pages/sidebar/components/Sidebar.tsx
Normal file
@@ -0,0 +1,35 @@
|
||||
import { FolderKanban, LayoutDashboard, Settings, PlayCircle } from 'lucide-react'
|
||||
import { Sidebar, type NavItem } from '@/components/a/Sidebar'
|
||||
import { Logo } from './CNBBlackLogo.tsx'
|
||||
|
||||
const navItems: NavItem[] = [
|
||||
{
|
||||
title: '仓库管理',
|
||||
path: '/',
|
||||
icon: <FolderKanban className="w-5 h-5" />,
|
||||
},
|
||||
{
|
||||
title: '工作空间',
|
||||
path: '/workspaces',
|
||||
icon: <LayoutDashboard className="w-5 h-5" />,
|
||||
},
|
||||
{
|
||||
title: '应用配置',
|
||||
path: '/config',
|
||||
icon: <Settings className="w-5 h-5" />,
|
||||
},
|
||||
{
|
||||
title: '其他',
|
||||
path: '/demo',
|
||||
icon: <PlayCircle className="w-5 h-5" />,
|
||||
isDeveloping: true,
|
||||
},
|
||||
]
|
||||
|
||||
export function SidebarLayout({ children }: { children: React.ReactNode }) {
|
||||
return (
|
||||
<Sidebar items={navItems} title='云原生' logo={<Logo className='w-6 h-6' />}>
|
||||
{children}
|
||||
</Sidebar>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user