File size: 820 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
import React from 'react';
import { Collapse, ConfigProvider } from 'antd';
/** Test usage. Do not use in your production. */
import type { CollapseProps } from 'antd';
const text = `Ant Design! `.repeat(26);
const items: CollapseProps['items'] = [
{ key: '1', label: `This is panel header 1, (${text})`, children: text },
{ key: '2', label: `This is panel header 2, (${text})`, children: text },
{ key: '3', label: `This is panel header 3, (${text})`, children: text },
];
export default () => (
<ConfigProvider
theme={{
components: {
Collapse: {
headerPadding: '0px 10px 20px 30px',
headerBg: '#eaeeff',
contentPadding: '0px 10px 20px 30px',
contentBg: '#e6f7ff',
},
},
}}
>
<Collapse items={items} />
</ConfigProvider>
);
|