1 |
|
2 |
|
3 | import * as React from 'react';
|
4 | import CommonProps from '../util';
|
5 |
|
6 | interface HTMLAttributesWeak extends React.HTMLAttributes<HTMLElement> {
|
7 | title?: any;
|
8 | }
|
9 |
|
10 | export interface PanelProps extends HTMLAttributesWeak, CommonProps {
|
11 | |
12 |
|
13 |
|
14 | prefix?: string;
|
15 |
|
16 | |
17 |
|
18 |
|
19 | style?: React.CSSProperties;
|
20 |
|
21 | |
22 |
|
23 |
|
24 | disabled?: boolean;
|
25 |
|
26 | |
27 |
|
28 |
|
29 | title?: React.ReactNode;
|
30 |
|
31 | |
32 |
|
33 |
|
34 | className?: string;
|
35 | }
|
36 |
|
37 | export class Panel extends React.Component<PanelProps, any> {}
|
38 |
|
39 | type data = {
|
40 | title?: React.ReactNode;
|
41 | content?: React.ReactNode;
|
42 | disabled?: boolean;
|
43 | key?: string;
|
44 | [propName: string]: any;
|
45 | }
|
46 |
|
47 | export interface CollapseProps extends React.HTMLAttributes<HTMLElement>, CommonProps {
|
48 | |
49 |
|
50 |
|
51 | prefix?: string;
|
52 |
|
53 | |
54 |
|
55 |
|
56 | style?: React.CSSProperties;
|
57 |
|
58 | |
59 |
|
60 |
|
61 | dataSource?: Array<data>;
|
62 |
|
63 | |
64 |
|
65 |
|
66 | defaultExpandedKeys?: Array<string>;
|
67 |
|
68 | |
69 |
|
70 |
|
71 | expandedKeys?: Array<string>;
|
72 |
|
73 | |
74 |
|
75 |
|
76 | onExpand?: (expandedKeys: Array<string>) => void;
|
77 |
|
78 | |
79 |
|
80 |
|
81 | disabled?: boolean;
|
82 |
|
83 | |
84 |
|
85 |
|
86 | className?: string;
|
87 |
|
88 | |
89 |
|
90 |
|
91 | accordion?: boolean;
|
92 | }
|
93 |
|
94 | export default class Collapse extends React.Component<CollapseProps, any> {
|
95 | static Panel: typeof Panel;
|
96 | }
|