UNPKG

1.03 kBTypeScriptView Raw
1import * as React from 'react';
2import CollapsePanel from './Panel';
3import { CollapseProps } from './interface';
4export interface CollapseState {
5 activeKey: React.Key[];
6}
7declare class Collapse extends React.Component<CollapseProps, CollapseState> {
8 static defaultProps: {
9 prefixCls: string;
10 onChange(): void;
11 accordion: boolean;
12 destroyInactivePanel: boolean;
13 };
14 static Panel: typeof CollapsePanel;
15 constructor(props: CollapseProps);
16 shouldComponentUpdate(nextProps: CollapseProps, nextState: CollapseState): boolean;
17 onClickItem: (key: React.Key) => void;
18 static getDerivedStateFromProps(nextProps: CollapseProps): Partial<CollapseState>;
19 getNewChild: (child: React.ReactElement, index: number) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
20 getItems: () => React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
21 setActiveKey: (activeKey: React.Key[]) => void;
22 render(): JSX.Element;
23}
24export default Collapse;