-
Notifications
You must be signed in to change notification settings - Fork 135
/
Copy pathinterface.ts
67 lines (63 loc) · 1.88 KB
/
interface.ts
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import type { CSSMotionProps } from 'rc-motion';
import type * as React from 'react';
export type CollapsibleType = 'header' | 'icon' | 'disabled';
export interface ItemType
extends Omit<
CollapsePanelProps,
| 'header' // alias of label
| 'prefixCls'
| 'panelKey' // alias of key
| 'isActive'
| 'accordion'
| 'openMotion'
| 'expandIcon'
> {
key?: CollapsePanelProps['panelKey'];
label?: CollapsePanelProps['header'];
ref?: React.RefObject<HTMLDivElement>;
}
export interface CollapseProps {
prefixCls?: string;
activeKey?: React.Key | React.Key[];
defaultActiveKey?: React.Key | React.Key[];
openMotion?: CSSMotionProps;
onChange?: (key: React.Key[]) => void;
accordion?: boolean;
className?: string;
style?: object;
destroyInactivePanel?: boolean;
expandIcon?: (props: object) => React.ReactNode;
collapsible?: CollapsibleType;
children?: React.ReactNode;
/**
* Collapse items content
* @since 3.6.0
*/
items?: ItemType[];
classNames?: Partial<Record<SemanticName, string>>;
styles?: Partial<Record<SemanticName, React.CSSProperties>>;
}
export type SemanticName = 'header' | 'title' | 'body' | 'icon';
export interface CollapsePanelProps extends React.DOMAttributes<HTMLDivElement> {
id?: string;
header?: string | React.ReactNode;
prefixCls?: string;
headerClass?: string;
showArrow?: boolean;
className?: string;
classNames?: Partial<Record<SemanticName, string>>;
style?: object;
styles?: Partial<Record<SemanticName, React.CSSProperties>>;
isActive?: boolean;
openMotion?: CSSMotionProps;
destroyInactivePanel?: boolean;
accordion?: boolean;
forceRender?: boolean;
extra?: string | React.ReactNode;
onItemClick?: (panelKey: React.Key) => void;
expandIcon?: (props: object) => React.ReactNode;
panelKey?: React.Key;
role?: string;
collapsible?: CollapsibleType;
children?: React.ReactNode;
}