UNPKG

1.02 kBTypeScriptView Raw
1import { BaseGesture, BaseGestureConfig } from './gesture';
2import { LongPressGestureConfig } from '../LongPressGestureHandler';
3import type { LongPressGestureHandlerEventPayload } from '../GestureHandlerEventPayload';
4export declare class LongPressGesture extends BaseGesture<LongPressGestureHandlerEventPayload> {
5 config: BaseGestureConfig & LongPressGestureConfig;
6 constructor();
7 /**
8 * Minimum time, expressed in milliseconds, that a finger must remain pressed on the corresponding view.
9 * The default value is 500.
10 * @param duration
11 */
12 minDuration(duration: number): this;
13 /**
14 * Maximum distance, expressed in points, that defines how far the finger is allowed to travel during a long press gesture.
15 * @param distance
16 * @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/long-press-gesture#maxdistancevalue-number
17 */
18 maxDistance(distance: number): this;
19}
20export type LongPressGestureType = InstanceType<typeof LongPressGesture>;