UNPKG

813 BTypeScriptView Raw
1declare module 'react-native-swipe-gestures' {
2 export type GestureRecognizerConfig = Partial<{
3 velocityThreshold: number;
4 directionalOffsetThreshold: number;
5 gestureIsClickThreshold: number;
6 }>;
7
8 export enum SwipeDirections {
9 SWIPE_UP = 'SWIPE_UP',
10 SWIPE_DOWN = 'SWIPE_DOWN',
11 SWIPE_LEFT = 'SWIPE_LEFT',
12 SWIPE_RIGHT = 'SWIPE_RIGHT',
13 }
14
15 export interface Props {
16 onSwipe?: (swipeDirection: SwipeDirections) => void;
17 onSwipeLeft?: () => void;
18 onSwipeRight?: () => void;
19 onSwipeTop?: () => void;
20 onSwipeBottom?: () => void;
21 config: GestureRecognizerConfig;
22 }
23
24 declare class GestureRecognizer extends React.Component<Props> {}
25
26 export default GestureRecognizer;
27}
28
29// https://github.com/emotion-js/emotion/pull/1176/
30declare module '@emotion/native';