ant-design/components/descriptions/demo/block.tsx
叶枫 7410b536b4
feat: Description item support block (#51365)
* 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
2024-10-28 15:19:39 +08:00

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;