Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ import { RootTagContext } from 'react-native/Libraries/ReactNative/RootTag';
// Wrap the children in AppContainer so the React Native inspector works
// within the modal. See https://github.com/facebook/react-native/blob/v0.81.4/packages/react-native/Libraries/Modal/Modal.js#L308
// for the inspiration within the RN Modal component.
export const AppContainerWrapper: FC<PropsWithChildren> = ({ children }) => {
export const LayoutInspectorProvider: FC<PropsWithChildren> = ({
children,
}) => {
const rootTag = useContext(RootTagContext);

// The inspector is only needed in development
Expand Down
10 changes: 5 additions & 5 deletions src/ModalView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { FC } from 'react';

import { Platform, Pressable, StatusBar, StyleSheet, View } from 'react-native';

import { AppContainerWrapper } from './AppContainerWrapper';
import { LayoutInspectorProvider } from './LayoutInspectorProvider';
import { ScrollContextResetter } from './ScrollContextResetter';
import { GestureHandlerRootView } from './integrations/GestureHandlerRootView';
import RNTModalView from './newarch/NativeRNTModalView';
Expand Down Expand Up @@ -38,8 +38,8 @@ export const ModalView: FC<ModalViewProps> = ({
onPressBackAndroid={() => onRequestDismiss?.(DismissalSource.BackButton)}
animationType={animationType}
>
<AppContainerWrapper>
<View collapsable={false} style={styles.flex}>
<View collapsable={false} style={styles.flex}>
<LayoutInspectorProvider>
{isIOS && statusBar && !disableDefaultStatusBarIOS ? (
<StatusBar {...statusBar} />
) : null}
Expand Down Expand Up @@ -69,8 +69,8 @@ export const ModalView: FC<ModalViewProps> = ({
</View>
</ScrollContextResetter>
</GestureHandlerRootView>
</View>
</AppContainerWrapper>
</LayoutInspectorProvider>
</View>
</RNTModalView>
);
};
Expand Down