ant-design/components/collapse/demo/component-token.tsx
叶枫 502dac12aa
docs: format code (#48309)
* docs: fix code

* feat: lint

* feat: prettier

* feat: test

* feat: review

* feat: format html

* feat: format html
2024-04-08 14:04:08 +08:00

30 lines
820 B
TypeScript

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>
);