mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-21 21:28:09 +08:00
7410b536b4
* feat: Descriptions support row * feat: review * feat: snap * feat: test * feat: review * feat: review * feat: test * feat: test * feat: add calc span * feat: snap * feat: block * feat: test change block * feat: doc * feat: doc * feat: test * feat: empty text test * feat: row > block * feat: remove block * feat: filled * feat: fiiled 逻辑修正 最后一个始终补齐 * feat: doc * feat: review * feat: review * feat: review
30 lines
697 B
TypeScript
30 lines
697 B
TypeScript
import React from 'react';
|
|
import { Descriptions } from 'antd';
|
|
import type { DescriptionsProps } from 'antd';
|
|
|
|
const items: DescriptionsProps['items'] = [
|
|
{
|
|
label: 'UserName',
|
|
children: 'Zhou Maomao',
|
|
},
|
|
{
|
|
label: 'Live',
|
|
span: 'filled', // span = 2
|
|
children: 'Hangzhou, Zhejiang',
|
|
},
|
|
{
|
|
label: 'Remark',
|
|
span: 'filled', // span = 3
|
|
children: 'empty',
|
|
},
|
|
{
|
|
label: 'Address',
|
|
span: 1, // span will be 3 and warning for span is not align to the end
|
|
children: 'No. 18, Wantang Road, Xihu District, Hangzhou, Zhejiang, China',
|
|
},
|
|
];
|
|
|
|
const App: React.FC = () => <Descriptions bordered title="User Info" items={items} />;
|
|
|
|
export default App;
|