UNPKG

2.47 kBTypeScriptView Raw
1/// <reference types="react" />
2import type { TapGestureHandlerEventPayload } from './GestureHandlerEventPayload';
3import { BaseGestureHandlerProps } from './gestureHandlerCommon';
4export declare const tapGestureHandlerProps: readonly ["maxDurationMs", "maxDelayMs", "numberOfTaps", "maxDeltaX", "maxDeltaY", "maxDist", "minPointers"];
5export interface TapGestureConfig {
6 /**
7 * Minimum number of pointers (fingers) required to be placed before the
8 * handler activates. Should be a positive integer.
9 * The default value is 1.
10 */
11 minPointers?: number;
12 /**
13 * Maximum time, expressed in milliseconds, that defines how fast a finger
14 * must be released after a touch. The default value is 500.
15 */
16 maxDurationMs?: number;
17 /**
18 * Maximum time, expressed in milliseconds, that can pass before the next tap
19 * if many taps are required. The default value is 500.
20 */
21 maxDelayMs?: number;
22 /**
23 * Number of tap gestures required to activate the handler. The default value
24 * is 1.
25 */
26 numberOfTaps?: number;
27 /**
28 * Maximum distance, expressed in points, that defines how far the finger is
29 * allowed to travel along the X axis during a tap gesture. If the finger
30 * travels further than the defined distance along the X axis and the handler
31 * hasn't yet activated, it will fail to recognize the gesture.
32 */
33 maxDeltaX?: number;
34 /**
35 * Maximum distance, expressed in points, that defines how far the finger is
36 * allowed to travel along the Y axis during a tap gesture. If the finger
37 * travels further than the defined distance along the Y axis and the handler
38 * hasn't yet activated, it will fail to recognize the gesture.
39 */
40 maxDeltaY?: number;
41 /**
42 * Maximum distance, expressed in points, that defines how far the finger is
43 * allowed to travel during a tap gesture. If the finger travels further than
44 * the defined distance and the handler hasn't yet
45 * activated, it will fail to recognize the gesture.
46 */
47 maxDist?: number;
48}
49export interface TapGestureHandlerProps extends BaseGestureHandlerProps<TapGestureHandlerEventPayload>, TapGestureConfig {
50}
51export declare const tapHandlerName = "TapGestureHandler";
52export type TapGestureHandler = typeof TapGestureHandler;
53export declare const TapGestureHandler: import("react").ComponentType<TapGestureHandlerProps & import("react").RefAttributes<any>>;