1 | import * as React from "react";
|
2 | import * as AnimateHeight from "react-animate-height";
|
3 | import { BoxProps } from "../Box";
|
4 |
|
5 | type AnimateHeightProps = Pick<
|
6 | AnimateHeight.AnimateHeightProps,
|
7 | | "animationStateClasses"
|
8 | | "applyInlineTransitions"
|
9 | | "delay"
|
10 | | "easing"
|
11 | | "style"
|
12 | | "children"
|
13 | >;
|
14 |
|
15 | export interface ICollapse {
|
16 | |
17 |
|
18 |
|
19 | isOpen?: boolean;
|
20 | |
21 |
|
22 |
|
23 | animateOpacity?: boolean;
|
24 | |
25 |
|
26 |
|
27 | duration?: number;
|
28 | |
29 |
|
30 |
|
31 | startingHeight?: number | string;
|
32 | |
33 |
|
34 |
|
35 | endingHeight?: number | string;
|
36 | |
37 |
|
38 |
|
39 | onAnimationEnd?(props: { newHeight: number }): void;
|
40 | |
41 |
|
42 |
|
43 | onAnimationStart?(props: { newHeight: number }): void;
|
44 | }
|
45 |
|
46 | export type CollapseProps = AnimateHeightProps & ICollapse & BoxProps;
|
47 |
|
48 | declare const Collapse: React.FC<CollapseProps>;
|
49 |
|
50 | export default Collapse;
|