@@ -4,10 +4,10 @@ import {
4
4
GestureHandlerTouchEvent ,
5
5
GestureHandlerEvent ,
6
6
} from './interfaces' ;
7
- import { View , ViewProps } from 'react-native' ;
7
+ import { View } from 'react-native' ;
8
8
import RNGestureHandlerModuleWeb from '../RNGestureHandlerModule.web' ;
9
9
import { ActionType } from '../ActionType' ;
10
- export interface GestureHandlerDetectorProps extends ViewProps {
10
+ export interface GestureHandlerDetectorProps {
11
11
onGestureHandlerEvent ?: ( e : GestureHandlerEvent ) => void ;
12
12
onGestureHandlerAnimatedEvent ?: ( e : GestureHandlerEvent ) => void ;
13
13
onGestureHandlerStateChange ?: ( e : GestureHandlerStateChangeEvent ) => void ;
@@ -16,6 +16,7 @@ export interface GestureHandlerDetectorProps extends ViewProps {
16
16
handlerTags : number [ ] ;
17
17
dispatchesAnimatedEvents : boolean ;
18
18
moduleId : number ;
19
+ children ?: React . ReactNode ;
19
20
}
20
21
21
22
const GestureHandlerDetector = ( props : GestureHandlerDetectorProps ) => {
@@ -27,6 +28,7 @@ const GestureHandlerDetector = (props: GestureHandlerDetectorProps) => {
27
28
handlerTags,
28
29
dispatchesAnimatedEvents,
29
30
moduleId,
31
+ children,
30
32
} = props ;
31
33
32
34
const viewRef = useRef ( null ) ;
@@ -54,7 +56,7 @@ const GestureHandlerDetector = (props: GestureHandlerDetectorProps) => {
54
56
) ;
55
57
} ) ;
56
58
} ;
57
- return < View ref = { viewRef } > { props . children } </ View > ;
59
+ return < View ref = { viewRef } > { children } </ View > ;
58
60
} ;
59
61
60
62
export default GestureHandlerDetector ;
0 commit comments