-
Notifications
You must be signed in to change notification settings - Fork 193
/
index.d.ts
118 lines (98 loc) · 2.48 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
import {
StyleProp,
ViewStyle,
ModalProps,
KeyboardAvoidingViewProps,
} from 'react-native';
interface RBSheetProps {
/**
* The height of bottom sheet.
*/
height?: number;
/**
* Duration of the animation when opening bottom sheet.
*/
openDuration?: number;
/**
* Duration of the animation when closing bottom sheet.
*/
closeDuration?: number;
/**
* Press the outside area (mask) to close bottom sheet.
*/
closeOnPressMask?: boolean;
/**
* Press hardware back android to close bottom sheet (Android only).
*/
closeOnPressBack?: boolean;
/**
* Enable the drag-down gesture to close the bottom sheet.
*/
draggable?: boolean;
/**
* The draggable is only worked on the draggable icon.
* Set this to true if you want to drag on the content as well (doesn't work with ScrollView).
*/
dragOnContent?: boolean;
/**
* Use the native driver to run smoother animation.
*/
useNativeDriver?: boolean;
/**
* Add custom styles to bottom sheet.
*
* wrapper: The Root of component (Change the mask's background color here).
*
* container: The Container of bottom sheet (The animated view that contains your component).
*
* draggableIcon: The style of Draggable Icon (If you set `draggable` to `true`).
*/
customStyles?: {
/**
* The Root of component (Change the mask's background color here).
*/
wrapper?: StyleProp<ViewStyle>;
/**
* The Container of bottom sheet (The animated view that contains your component).
*/
container?: StyleProp<ViewStyle>;
/**
* The style of Draggable Icon (If you set `draggable` to `true`).
*/
draggableIcon?: StyleProp<ViewStyle>;
};
/**
* Add custom props to modal.
*/
customModalProps?: ModalProps;
/**
* Add custom props to KeyboardAvoidingView.
*/
customAvoidingViewProps?: KeyboardAvoidingViewProps;
/**
* Callback function that will be called after the bottom sheet has been opened.
*/
onOpen?: () => void;
/**
* Callback function that will be called after the bottom sheet has been closed.
*/
onClose?: () => void;
/**
* Your own compoent.
*/
children?: React.ReactNode;
}
interface RBSheetRef {
/**
* The method to open bottom sheet.
*/
open: () => void;
/**
* The method to close bottom sheet.
*/
close: () => void;
}
declare const RBSheet: React.ForwardRefExoticComponent<
RBSheetProps & React.RefAttributes<RBSheetRef>
>;
export default RBSheet;