UNPKG

1.84 kBTypeScriptView Raw
1/// <reference types="react" />
2import { LongPressGestureHandlerEventPayload } from './GestureHandlerEventPayload';
3import { BaseGestureHandlerProps } from './gestureHandlerCommon';
4export declare const longPressGestureHandlerProps: readonly ["minDurationMs", "maxDist", "numberOfPointers"];
5export interface LongPressGestureConfig {
6 /**
7 * Minimum time, expressed in milliseconds, that a finger must remain pressed on
8 * the corresponding view. The default value is 500.
9 */
10 minDurationMs?: number;
11 /**
12 * Maximum distance, expressed in points, that defines how far the finger is
13 * allowed to travel during a long press gesture. If the finger travels
14 * further than the defined distance and the handler hasn't yet activated, it
15 * will fail to recognize the gesture. The default value is 10.
16 */
17 maxDist?: number;
18 /**
19 * Determine exact number of points required to handle the long press gesture.
20 */
21 numberOfPointers?: number;
22}
23/**
24 * @deprecated LongPressGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.LongPress()` instead.
25 */
26export interface LongPressGestureHandlerProps extends BaseGestureHandlerProps<LongPressGestureHandlerEventPayload>, LongPressGestureConfig {
27}
28export declare const longPressHandlerName = "LongPressGestureHandler";
29/**
30 * @deprecated LongPressGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.LongPress()` instead.
31 */
32export type LongPressGestureHandler = typeof LongPressGestureHandler;
33/**
34 * @deprecated LongPressGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.LongPress()` instead.
35 */
36export declare const LongPressGestureHandler: import("react").ComponentType<LongPressGestureHandlerProps & import("react").RefAttributes<any>>;