ant-design/components/descriptions/demo/vertical.tsx
红果汁 ecb36840bf
feat: Descriptions implement items API (#43483)
* feat: descriptions implement items api

* docs: add jsx debug demo

* refactor: add useRow hook

* Update components/descriptions/index.tsx

Co-authored-by: Wuxh <wxh1220@gmail.com>
Signed-off-by: 红果汁 <pingfj77@gmail.com>

* Update components/descriptions/index.zh-CN.md

Co-authored-by: Wuxh <wxh1220@gmail.com>
Signed-off-by: 红果汁 <pingfj77@gmail.com>

* Update components/descriptions/index.en-US.md

Co-authored-by: Wuxh <wxh1220@gmail.com>
Signed-off-by: 红果汁 <pingfj77@gmail.com>

* fix: decrease in coverage

* refactor: enhancement code

---------

Signed-off-by: 红果汁 <pingfj77@gmail.com>
Co-authored-by: Wuxh <wxh1220@gmail.com>
2023-07-17 14:48:03 +08:00

37 lines
726 B
TypeScript

import { Descriptions } from 'antd';
import type { DescriptionsProps } from 'antd/es/descriptions';
import React from 'react';
const items: DescriptionsProps['items'] = [
{
key: '1',
label: 'UserName',
children: 'Zhou Maomao',
},
{
key: '2',
label: 'Telephone',
children: '1810000000',
},
{
key: '3',
label: 'Live',
children: 'Hangzhou, Zhejiang',
},
{
key: '4',
label: 'Address',
span: 2,
children: 'No. 18, Wantang Road, Xihu District, Hangzhou, Zhejiang, China',
},
{
key: '5',
label: 'Remark',
children: 'empty',
},
];
const App: React.FC = () => <Descriptions title="User Info" layout="vertical" items={items} />;
export default App;