UNPKG

react-native-zoom-toolkit

Version:

Most complete set of pinch to zoom utilites for React Native

26 lines 1.21 kB
import { type SharedValue } from 'react-native-reanimated'; import type { GestureUpdateEvent, PanGestureChangeEventPayload, PanGestureHandlerEventPayload } from 'react-native-gesture-handler'; import type { PanMode, BoundsFuction, Vector, SizeVector, PanGestureEventCallback, PanGestureEvent, SwipeDirection } from '../types'; type PanCommmonOptions = { container: SizeVector<SharedValue<number>>; translate: Vector<SharedValue<number>>; offset: Vector<SharedValue<number>>; panMode: PanMode; decay?: boolean; boundFn: BoundsFuction; userCallbacks: Partial<{ onGestureEnd: () => void; onPanStart: PanGestureEventCallback; onPanEnd: PanGestureEventCallback; onSwipe: (direction: SwipeDirection) => void; onOverPanning: (x: number, y: number) => void; }>; }; type PanGestureUpdadeEvent = GestureUpdateEvent<PanGestureHandlerEventPayload & PanGestureChangeEventPayload>; export declare const usePanCommons: (options: PanCommmonOptions) => { onPanStart: (e: PanGestureEvent) => void; onPanChange: (e: PanGestureUpdadeEvent) => void; onPanEnd: (e: PanGestureEvent) => void; }; export {}; //# sourceMappingURL=usePanCommons.d.ts.map