forked from oblador/react-native-collapsible
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
91 lines (81 loc) · 1.79 KB
/
index.d.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
import * as React from 'react';
import { StyleProp, ViewStyle } from 'react-native';
export type EasingMode =
| 'linear'
| 'easeInQuad'
| 'easeOutQuad'
| 'easeInOutQuad'
| 'easeInCubic'
| 'easeOutCubic'
| 'easeInOutCubic'
| 'easeInQuart'
| 'easeOutQuart'
| 'easeInOutQuart'
| 'easeInQuint'
| 'easeOutQuint'
| 'easeInOutQuint'
| 'easeInSine'
| 'easeOutSine'
| 'easeInOutSine'
| 'easeInExpo'
| 'easeOutExpo'
| 'easeInOutExpo'
| 'easeInCirc'
| 'easeOutCirc'
| 'easeInOutCirc'
| 'easeInElastic'
| 'easeOutElastic'
| 'easeInOutElastic'
| 'easeInBack'
| 'easeOutBack'
| 'easeInOutBack'
| 'easeInBounce'
| 'easeOutBounce'
| 'easeInOutBounce';
export interface CollapsibleProps {
/**
* Alignment of the content when transitioning, can be top, center or bottom
*
* @default top
*/
align?: 'top' | 'center' | 'bottom';
/**
* Whether to show the child components or not
*
* @default true
*/
collapsed?: boolean;
/**
* Which height should the component collapse to
*
* @default 0
*/
collapsedHeight?: number;
/**
* Duration of transition in milliseconds
*
* @default 300
*/
duration?: number;
/**
* Enable pointer events on collapsed view
*
* @default false
*/
enablePointerEvents?: boolean;
/**
* Function or function name from Easing (or tween-functions if < RN 0.8). Collapsible will try to combine Easing functions for you if you name them like tween-functions
*
* @default easeOutCubic
*/
easing?: EasingMode | any;
/**
* Optional styling for the container
*/
style?: StyleProp<ViewStyle>;
/**
* Function called when the animation finished
*/
onAnimationEnd?: () => void;
}
export default class Collapsible extends React.Component<CollapsibleProps> {}