mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-04 00:49:39 +08:00
c054a2bb80
* fix: update demo style * update snap
71 lines
1.8 KiB
TypeScript
71 lines
1.8 KiB
TypeScript
import React from 'react';
|
|
import { Layout, Space } from 'antd';
|
|
|
|
const { Header, Footer, Sider, Content } = Layout;
|
|
|
|
const headerStyle: React.CSSProperties = {
|
|
textAlign: 'center',
|
|
color: '#fff',
|
|
height: 64,
|
|
paddingInline: 50,
|
|
lineHeight: '64px',
|
|
backgroundColor: '#7dbcea',
|
|
};
|
|
|
|
const contentStyle: React.CSSProperties = {
|
|
textAlign: 'center',
|
|
minHeight: 120,
|
|
lineHeight: '120px',
|
|
color: '#fff',
|
|
backgroundColor: '#108ee9',
|
|
};
|
|
|
|
const siderStyle: React.CSSProperties = {
|
|
textAlign: 'center',
|
|
lineHeight: '120px',
|
|
color: '#fff',
|
|
backgroundColor: '#3ba0e9',
|
|
};
|
|
|
|
const footerStyle: React.CSSProperties = {
|
|
textAlign: 'center',
|
|
color: '#fff',
|
|
backgroundColor: '#7dbcea',
|
|
};
|
|
|
|
const App: React.FC = () => (
|
|
<Space direction="vertical" style={{ width: '100%' }} size={[0, 48]}>
|
|
<Layout>
|
|
<Header style={headerStyle}>Header</Header>
|
|
<Content style={contentStyle}>Content</Content>
|
|
<Footer style={footerStyle}>Footer</Footer>
|
|
</Layout>
|
|
<Layout>
|
|
<Header style={headerStyle}>Header</Header>
|
|
<Layout>
|
|
<Sider style={siderStyle}>Sider</Sider>
|
|
<Content style={contentStyle}>Content</Content>
|
|
</Layout>
|
|
<Footer style={footerStyle}>Footer</Footer>
|
|
</Layout>
|
|
<Layout>
|
|
<Header style={headerStyle}>Header</Header>
|
|
<Layout>
|
|
<Content style={contentStyle}>Content</Content>
|
|
<Sider style={siderStyle}>Sider</Sider>
|
|
</Layout>
|
|
<Footer style={footerStyle}>Footer</Footer>
|
|
</Layout>
|
|
<Layout>
|
|
<Sider style={siderStyle}>Sider</Sider>
|
|
<Layout>
|
|
<Header style={headerStyle}>Header</Header>
|
|
<Content style={contentStyle}>Content</Content>
|
|
<Footer style={footerStyle}>Footer</Footer>
|
|
</Layout>
|
|
</Layout>
|
|
</Space>
|
|
);
|
|
|
|
export default App;
|