forked from software-mansion/react-native-gesture-handler
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSwipeable.d.ts
More file actions
61 lines (59 loc) · 2.16 KB
/
Swipeable.d.ts
File metadata and controls
61 lines (59 loc) · 2.16 KB
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
declare module 'react-native-gesture-handler/Swipeable' {
import * as React from 'react'
import { Animated, StyleProp, ViewStyle } from 'react-native';
import { PanGestureHandlerProperties } from 'react-native-gesture-handler'
type SwipeableExcludes = Exclude<keyof PanGestureHandlerProperties, 'onGestureEvent' | 'onHandlerStateChange'>
interface SwipeableProperties extends Pick<PanGestureHandlerProperties, SwipeableExcludes> {
enableTrackpadTwoFingerGesture?: boolean;
friction?: number;
leftThreshold?: number;
rightThreshold?: number;
overshootLeft?: boolean;
overshootRight?: boolean;
overshootFriction?: number,
onSwipeableLeftOpen?: () => void;
onSwipeableRightOpen?: () => void;
onSwipeableOpen?: () => void;
onSwipeableClose?: () => void;
onSwipeableLeftWillOpen?: () => void;
onSwipeableRightWillOpen?: () => void;
onSwipeableWillOpen?: () => void;
onSwipeableWillClose?: () => void;
/**
*
* This map describes the values to use as inputRange for extra interpolation:
* AnimatedValue: [startValue, endValue]
*
* progressAnimatedValue: [0, 1]
* dragAnimatedValue: [0, +]
*
* To support `rtl` flexbox layouts use `flexDirection` styling.
* */
renderLeftActions?: (
progressAnimatedValue: Animated.AnimatedInterpolation,
dragAnimatedValue: Animated.AnimatedInterpolation
) => React.ReactNode;
/**
*
* This map describes the values to use as inputRange for extra interpolation:
* AnimatedValue: [startValue, endValue]
*
* progressAnimatedValue: [0, 1]
* dragAnimatedValue: [0, -]
*
* To support `rtl` flexbox layouts use `flexDirection` styling.
* */
renderRightActions?: (
progressAnimatedValue: Animated.AnimatedInterpolation,
dragAnimatedValue: Animated.AnimatedInterpolation
) => React.ReactNode;
useNativeAnimations?: boolean;
containerStyle?: StyleProp<ViewStyle>;
childrenContainerStyle?: StyleProp<ViewStyle>;
}
export default class Swipeable extends React.Component<SwipeableProperties> {
close: () => void;
openLeft: () => void;
openRight: () => void;
}
}