UNPKG

2.24 kBTypeScriptView Raw
1import { BaseGestureConfig, BaseGesture } from './gesture';
2import { TapGestureConfig } from '../TapGestureHandler';
3import type { TapGestureHandlerEventPayload } from '../GestureHandlerEventPayload';
4export declare class TapGesture extends BaseGesture<TapGestureHandlerEventPayload> {
5 config: BaseGestureConfig & TapGestureConfig;
6 constructor();
7 /**
8 * Minimum number of pointers (fingers) required to be placed before the gesture activates.
9 * Should be a positive integer. The default value is 1.
10 * @param minPointers
11 */
12 minPointers(minPointers: number): this;
13 /**
14 * Number of tap gestures required to activate the gesture.
15 * The default value is 1.
16 * @param count
17 */
18 numberOfTaps(count: number): this;
19 /**
20 * Maximum distance, expressed in points, that defines how far the finger is allowed to travel during a tap gesture.
21 * @param maxDist
22 * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/tap-gesture#maxdistancevalue-number
23 */
24 maxDistance(maxDist: number): this;
25 /**
26 * Maximum time, expressed in milliseconds, that defines how fast a finger must be released after a touch.
27 * The default value is 500.
28 * @param duration
29 */
30 maxDuration(duration: number): this;
31 /**
32 * Maximum time, expressed in milliseconds, that can pass before the next tap — if many taps are required.
33 * The default value is 500.
34 * @param delay
35 */
36 maxDelay(delay: number): this;
37 /**
38 * Maximum distance, expressed in points, that defines how far the finger is allowed to travel along the X axis during a tap gesture.
39 * @param delta
40 * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/tap-gesture#maxdeltaxvalue-number
41 */
42 maxDeltaX(delta: number): this;
43 /**
44 * Maximum distance, expressed in points, that defines how far the finger is allowed to travel along the Y axis during a tap gesture.
45 * @param delta
46 * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/tap-gesture#maxdeltayvalue-number
47 */
48 maxDeltaY(delta: number): this;
49}
50export type TapGestureType = InstanceType<typeof TapGesture>;