forked from software-mansion/react-native-gesture-handler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GestureHandlerPropTypes.js
45 lines (43 loc) · 1.29 KB
/
GestureHandlerPropTypes.js
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
import PropTypes from 'prop-types';
// If changed, add changes to NATIVE_WRAPPER_PROPS_FILTER as well
const GestureHandlerPropTypes = {
id: PropTypes.string,
minPointers: PropTypes.number,
enabled: PropTypes.bool,
waitFor: PropTypes.oneOfType([
PropTypes.string,
PropTypes.object,
PropTypes.arrayOf(
PropTypes.oneOfType([PropTypes.string, PropTypes.object])
),
]),
simultaneousHandlers: PropTypes.oneOfType([
PropTypes.string,
PropTypes.object,
PropTypes.arrayOf(
PropTypes.oneOfType([PropTypes.string, PropTypes.object])
),
]),
shouldCancelWhenOutside: PropTypes.bool,
hitSlop: PropTypes.oneOfType([
PropTypes.number,
PropTypes.shape({
left: PropTypes.number,
top: PropTypes.number,
right: PropTypes.number,
bottom: PropTypes.number,
vertical: PropTypes.number,
horizontal: PropTypes.number,
width: PropTypes.number,
height: PropTypes.number,
}),
]),
onGestureEvent: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
onHandlerStateChange: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
onBegan: PropTypes.func,
onFailed: PropTypes.func,
onCancelled: PropTypes.func,
onActivated: PropTypes.func,
onEnded: PropTypes.func,
};
export default GestureHandlerPropTypes;