Skip to content

Commit 56b93d3

Browse files
committed
not extending view props
1 parent d7dd057 commit 56b93d3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

packages/react-native-gesture-handler/src/web/GestureHandlerDetector.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import {
44
GestureHandlerTouchEvent,
55
GestureHandlerEvent,
66
} from './interfaces';
7-
import { View, ViewProps } from 'react-native';
7+
import { View } from 'react-native';
88
import RNGestureHandlerModuleWeb from '../RNGestureHandlerModule.web';
99
import { ActionType } from '../ActionType';
10-
export interface GestureHandlerDetectorProps extends ViewProps {
10+
export interface GestureHandlerDetectorProps {
1111
onGestureHandlerEvent?: (e: GestureHandlerEvent) => void;
1212
onGestureHandlerAnimatedEvent?: (e: GestureHandlerEvent) => void;
1313
onGestureHandlerStateChange?: (e: GestureHandlerStateChangeEvent) => void;
@@ -16,6 +16,7 @@ export interface GestureHandlerDetectorProps extends ViewProps {
1616
handlerTags: number[];
1717
dispatchesAnimatedEvents: boolean;
1818
moduleId: number;
19+
children?: React.ReactNode;
1920
}
2021

2122
const GestureHandlerDetector = (props: GestureHandlerDetectorProps) => {
@@ -27,6 +28,7 @@ const GestureHandlerDetector = (props: GestureHandlerDetectorProps) => {
2728
handlerTags,
2829
dispatchesAnimatedEvents,
2930
moduleId,
31+
children,
3032
} = props;
3133

3234
const viewRef = useRef(null);
@@ -54,7 +56,7 @@ const GestureHandlerDetector = (props: GestureHandlerDetectorProps) => {
5456
);
5557
});
5658
};
57-
return <View ref={viewRef}>{props.children}</View>;
59+
return <View ref={viewRef}>{children}</View>;
5860
};
5961

6062
export default GestureHandlerDetector;

0 commit comments

Comments
 (0)