Open History to see the last commit
1import type { ReactNode } from "react";
2import { SafeAreaView } from "react-native-safe-area-context";
3
4import { useNativeWorkspaceColumnsSupported } from "./NativeWorkspaceColumns";
5
6// Pads with the inspector column's insets, which the column leaves to its panes so their
7// native headers lay out against the vertical bar themselves.
8export function NativeInspectorContent(props: { readonly children: ReactNode }) {
9 const usesNativeWorkspaceColumns = useNativeWorkspaceColumnsSupported();
10 if (!usesNativeWorkspaceColumns) return <>{props.children}</>;
11
12 return (
13 <SafeAreaView edges={["left", "right"]} style={{ flex: 1 }}>
14 {props.children}
15 </SafeAreaView>
16 );
17}