mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-17 02:18:07 +08:00
47 lines
1.3 KiB
TypeScript
47 lines
1.3 KiB
TypeScript
import React from 'react';
|
|
import { Breadcrumb, Layout, Menu, theme } from 'antd';
|
|
|
|
const { Header, Content, Footer } = Layout;
|
|
|
|
const App: React.FC = () => {
|
|
const {
|
|
token: { colorBgContainer },
|
|
} = theme.useToken();
|
|
|
|
return (
|
|
<Layout>
|
|
<Header style={{ position: 'sticky', top: 0, zIndex: 1, width: '100%' }}>
|
|
<div
|
|
style={{
|
|
float: 'left',
|
|
width: 120,
|
|
height: 31,
|
|
margin: '16px 24px 16px 0',
|
|
background: 'rgba(255, 255, 255, 0.2)',
|
|
}}
|
|
/>
|
|
<Menu
|
|
theme="dark"
|
|
mode="horizontal"
|
|
defaultSelectedKeys={['2']}
|
|
items={new Array(3).fill(null).map((_, index) => ({
|
|
key: String(index + 1),
|
|
label: `nav ${index + 1}`,
|
|
}))}
|
|
/>
|
|
</Header>
|
|
<Content className="site-layout" style={{ padding: '0 50px' }}>
|
|
<Breadcrumb style={{ margin: '16px 0' }}>
|
|
<Breadcrumb.Item>Home</Breadcrumb.Item>
|
|
<Breadcrumb.Item>List</Breadcrumb.Item>
|
|
<Breadcrumb.Item>App</Breadcrumb.Item>
|
|
</Breadcrumb>
|
|
<div style={{ padding: 24, minHeight: 380, background: colorBgContainer }}>Content</div>
|
|
</Content>
|
|
<Footer style={{ textAlign: 'center' }}>Ant Design ©2023 Created by Ant UED</Footer>
|
|
</Layout>
|
|
);
|
|
};
|
|
|
|
export default App;
|