1 | import type { CSSMotionProps } from 'rc-motion';
|
2 | import type * as React from 'react';
|
3 | export type CollapsibleType = 'header' | 'icon' | 'disabled';
|
4 | export interface ItemType extends Omit<CollapsePanelProps, 'header' | 'prefixCls' | 'panelKey' | 'isActive' | 'accordion' | 'openMotion' | 'expandIcon'> {
|
5 | key?: CollapsePanelProps['panelKey'];
|
6 | label?: CollapsePanelProps['header'];
|
7 | ref?: React.RefObject<HTMLDivElement>;
|
8 | }
|
9 | export interface CollapseProps {
|
10 | prefixCls?: string;
|
11 | activeKey?: React.Key | React.Key[];
|
12 | defaultActiveKey?: React.Key | React.Key[];
|
13 | openMotion?: CSSMotionProps;
|
14 | onChange?: (key: React.Key[]) => void;
|
15 | accordion?: boolean;
|
16 | className?: string;
|
17 | style?: object;
|
18 | destroyInactivePanel?: boolean;
|
19 | expandIcon?: (props: object) => React.ReactNode;
|
20 | collapsible?: CollapsibleType;
|
21 | children?: React.ReactNode;
|
22 | |
23 |
|
24 |
|
25 |
|
26 | items?: ItemType[];
|
27 | }
|
28 | export interface CollapsePanelProps extends React.DOMAttributes<HTMLDivElement> {
|
29 | id?: string;
|
30 | header?: string | React.ReactNode;
|
31 | prefixCls?: string;
|
32 | headerClass?: string;
|
33 | showArrow?: boolean;
|
34 | className?: string;
|
35 | classNames?: {
|
36 | header?: string;
|
37 | body?: string;
|
38 | };
|
39 | style?: object;
|
40 | styles?: {
|
41 | header?: React.CSSProperties;
|
42 | body?: React.CSSProperties;
|
43 | };
|
44 | isActive?: boolean;
|
45 | openMotion?: CSSMotionProps;
|
46 | destroyInactivePanel?: boolean;
|
47 | accordion?: boolean;
|
48 | forceRender?: boolean;
|
49 | extra?: string | React.ReactNode;
|
50 | onItemClick?: (panelKey: React.Key) => void;
|
51 | expandIcon?: (props: object) => React.ReactNode;
|
52 | panelKey?: React.Key;
|
53 | role?: string;
|
54 | collapsible?: CollapsibleType;
|
55 | children?: React.ReactNode;
|
56 | }
|