import React, { useState } from 'react'; import { MenuFoldOutlined, MenuUnfoldOutlined, UploadOutlined, UserOutlined, VideoCameraOutlined, } from '@ant-design/icons'; import { Layout, Menu, theme } from 'antd'; const { Header, Sider, Content } = Layout; const App: React.FC = () => { const [collapsed, setCollapsed] = useState(false); const { token: { colorBgContainer }, } = theme.useToken(); return (
, label: 'nav 1', }, { key: '2', icon: , label: 'nav 2', }, { key: '3', icon: , label: 'nav 3', }, ]} />
{React.createElement(collapsed ? MenuUnfoldOutlined : MenuFoldOutlined, { className: 'trigger', onClick: () => setCollapsed(!collapsed), })}
Content
); }; export default App;