mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-15 00:29:12 +08:00
88c629e4e9
* fix: descriptions buttom right padding style * feat: demo * feat: demo * feat: test * feat: style * feat: paddingInlineEnd * feat: test * feat: remove long demo * feat: add demo * feat: add demo * feat: add demo
45 lines
1.1 KiB
TypeScript
45 lines
1.1 KiB
TypeScript
import React from 'react';
|
|
import { Descriptions, Flex } from 'antd';
|
|
import type { DescriptionsProps } from 'antd';
|
|
|
|
const items: DescriptionsProps['items'] = [
|
|
{
|
|
key: '1',
|
|
label: 'long',
|
|
children: 'loooooooooooooooooooooooooooooooooooooooooooooooong',
|
|
},
|
|
{
|
|
key: '2',
|
|
label: 'long',
|
|
children: 'loooooooooooooooooooooooooooooooooooooooooooooooong',
|
|
},
|
|
{
|
|
key: '3',
|
|
label: 'long',
|
|
children: 'loooooooooooooooooooooooooooooooooooooooooooooooong',
|
|
},
|
|
{
|
|
key: '4',
|
|
label: 'long',
|
|
children: 'loooooooooooooooooooooooooooooooooooooooooooooooong',
|
|
},
|
|
{
|
|
key: '5',
|
|
label: 'long',
|
|
children: 'loooooooooooooooooooooooooooooooooooooooooooooooong',
|
|
},
|
|
];
|
|
|
|
const App: React.FC = () => (
|
|
<Flex gap={8} vertical>
|
|
<div style={{ width: 600, border: '1px solid', padding: 20 }}>
|
|
<Descriptions title="User Info" column={2} items={items} />
|
|
</div>
|
|
<div style={{ width: 600, border: '1px solid', padding: 20 }}>
|
|
<Descriptions layout="vertical" title="User Info" column={2} items={items} />
|
|
</div>
|
|
</Flex>
|
|
);
|
|
|
|
export default App;
|