前端: 添加侧边栏组件
This commit is contained in:
parent
1c27f615fd
commit
48755f18b0
54
frontend/src/renderer/components/Sidebar.jsx
Normal file
54
frontend/src/renderer/components/Sidebar.jsx
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { Menu } from 'antd';
|
||||||
|
import {
|
||||||
|
FolderOutlined,
|
||||||
|
ClockCircleOutlined,
|
||||||
|
ShareAltOutlined,
|
||||||
|
DeleteOutlined,
|
||||||
|
CloudOutlined
|
||||||
|
} from '@ant-design/icons';
|
||||||
|
|
||||||
|
function Sidebar({ collapsed, onCollapse }) {
|
||||||
|
const menuItems = [
|
||||||
|
{
|
||||||
|
key: 'files',
|
||||||
|
icon: <FolderOutlined />,
|
||||||
|
label: '我的文件',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'recent',
|
||||||
|
icon: <ClockCircleOutlined />,
|
||||||
|
label: '最近访问',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'shared',
|
||||||
|
icon: <ShareAltOutlined />,
|
||||||
|
label: '共享文件',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'trash',
|
||||||
|
icon: <DeleteOutlined />,
|
||||||
|
label: '回收站',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'divider',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'storage',
|
||||||
|
icon: <CloudOutlined />,
|
||||||
|
label: '存储空间: 2.1GB/10GB',
|
||||||
|
disabled: true,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Menu
|
||||||
|
mode="inline"
|
||||||
|
defaultSelectedKeys={['files']}
|
||||||
|
items={menuItems}
|
||||||
|
style={{ height: '100%', borderRight: 0 }}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Sidebar;
|
||||||
Loading…
Reference in New Issue
Block a user