1 | import * as React from 'react';
|
2 | import {
|
3 | PanGestureHandler as PanGestureHandlerNative,
|
4 | PanGestureHandlerProperties,
|
5 | } from 'react-native-gesture-handler';
|
6 |
|
7 | import GestureHandlerRefContext from '../utils/GestureHandlerRefContext';
|
8 |
|
9 | export function PanGestureHandler(props: PanGestureHandlerProperties) {
|
10 | const gestureRef = React.useRef<PanGestureHandlerNative>(null);
|
11 |
|
12 | return (
|
13 | <GestureHandlerRefContext.Provider value={gestureRef}>
|
14 | <PanGestureHandlerNative {...props} ref={gestureRef} />
|
15 | </GestureHandlerRefContext.Provider>
|
16 | );
|
17 | }
|
18 |
|
19 | export type { PanGestureHandlerGestureEvent } from 'react-native-gesture-handler';
|
20 | export {
|
21 | GestureHandlerRootView,
|
22 | State as GestureState,
|
23 | } from 'react-native-gesture-handler';
|