UNPKG

1.05 kBTypeScriptView Raw
1import { BaseGestureConfig, ContinousBaseGesture } from './gesture';
2import { GestureUpdateEvent } from '../gestureHandlerCommon';
3import type { HoverGestureHandlerEventPayload } from '../GestureHandlerEventPayload';
4export type HoverGestureChangeEventPayload = {
5 changeX: number;
6 changeY: number;
7};
8export declare enum HoverEffect {
9 NONE = 0,
10 LIFT = 1,
11 HIGHLIGHT = 2
12}
13export interface HoverGestureConfig {
14 hoverEffect?: HoverEffect;
15}
16export declare const hoverGestureHandlerProps: readonly ["hoverEffect"];
17export declare class HoverGesture extends ContinousBaseGesture<HoverGestureHandlerEventPayload, HoverGestureChangeEventPayload> {
18 config: BaseGestureConfig & HoverGestureConfig;
19 constructor();
20 /**
21 * #### iOS only
22 * Sets the visual hover effect.
23 */
24 effect(effect: HoverEffect): this;
25 onChange(callback: (event: GestureUpdateEvent<HoverGestureHandlerEventPayload & HoverGestureChangeEventPayload>) => void): this;
26}
27export type HoverGestureType = InstanceType<typeof HoverGesture>;