-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Expand file tree
/
Copy pathGestureHandlerRootView.android.tsx
More file actions
28 lines (25 loc) · 946 Bytes
/
GestureHandlerRootView.android.tsx
File metadata and controls
28 lines (25 loc) · 946 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import * as React from 'react';
import GestureHandlerRootViewContext from '../GestureHandlerRootViewContext';
import GestureHandlerRootViewNativeComponent from '../specs/RNGestureHandlerRootViewNativeComponent';
import type { PropsWithChildren } from 'react';
import type { RootViewNativeProps } from '../specs/RNGestureHandlerRootViewNativeComponent';
import { StyleSheet } from 'react-native';
export interface GestureHandlerRootViewProps
extends PropsWithChildren<RootViewNativeProps> {}
export default function GestureHandlerRootView({
style,
...rest
}: GestureHandlerRootViewProps) {
return (
<GestureHandlerRootViewContext value>
<GestureHandlerRootViewNativeComponent
style={style ?? styles.container}
{...rest}
moduleId={globalThis._RNGH_MODULE_ID} // Ensure moduleId is set
/>
</GestureHandlerRootViewContext>
);
}
const styles = StyleSheet.create({
container: { flex: 1 },
});