UNPKG

1.57 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}
28export interface ForceTouchGestureHandlerProps extends BaseGestureHandlerProps<ForceTouchGestureHandlerEventPayload>, ForceTouchGestureConfig {
29}
30export type ForceTouchGestureHandler = typeof ForceTouchGestureHandler & {
31 forceTouchAvailable: boolean;
32};
33export declare const forceTouchHandlerName = "ForceTouchGestureHandler";
34export declare const ForceTouchGestureHandler: typeof ForceTouchFallback | React.ComponentType<ForceTouchGestureHandlerProps & React.RefAttributes<any>>;
35export {};