UNPKG

2 kBTypeScriptView Raw
1import React, { PropsWithChildren } from 'react';
2import { BaseGestureHandlerProps } from './gestureHandlerCommon';
3import type { ForceTouchGestureHandlerEventPayload } from './GestureHandlerEventPayload';
4export declare const forceTouchGestureHandlerProps: readonly ["minForce", "maxForce", "feedbackOnActivation"];
5declare class ForceTouchFallback extends React.Component<PropsWithChildren<unknown>> {
6 static forceTouchAvailable: boolean;
7 componentDidMount(): void;
8 render(): React.ReactNode;
9}
10export interface ForceTouchGestureConfig {
11 /**
12 *
13 * A minimal pressure that is required before handler can activate. Should be a
14 * value from range `[0.0, 1.0]`. Default is `0.2`.
15 */
16 minForce?: number;
17 /**
18 * A maximal pressure that could be applied for handler. If the pressure is
19 * greater, handler fails. Should be a value from range `[0.0, 1.0]`.
20 */
21 maxForce?: number;
22 /**
23 * Boolean value defining if haptic feedback has to be performed on
24 * activation.
25 */
26 feedbackOnActivation?: boolean;
27}
28/**
29 * @deprecated ForceTouchGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.ForceTouch()` instead.
30 */
31export interface ForceTouchGestureHandlerProps extends BaseGestureHandlerProps<ForceTouchGestureHandlerEventPayload>, ForceTouchGestureConfig {
32}
33/**
34 * @deprecated ForceTouchGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.ForceTouch()` instead.
35 */
36export type ForceTouchGestureHandler = typeof ForceTouchGestureHandler & {
37 forceTouchAvailable: boolean;
38};
39export declare const forceTouchHandlerName = "ForceTouchGestureHandler";
40/**
41 * @deprecated ForceTouchGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.ForceTouch()` instead.
42 */
43export declare const ForceTouchGestureHandler: typeof ForceTouchFallback | React.ComponentType<ForceTouchGestureHandlerProps & React.RefAttributes<any>>;
44export {};