myjourney/components/ui/Wrapper.tsx
2025-06-21 20:26:51 -07:00

24 lines
748 B
TypeScript

import { View } from "react-native";
import { ThemedView } from "../ThemedView";
import { SafeAreaView, useSafeAreaInsets } from "react-native-safe-area-context";
import { useTheme } from "react-native-paper";
export default function Wrapper({ children }: { children: React.ReactNode }) {
const insets = useSafeAreaInsets();
const theme = useTheme();
return (
<ThemedView style={{ flex: 1 }}>
<View style={{
backgroundColor: theme.colors.primary,
position: 'absolute',
top: 0,
left: 0,
right: 0,
height: insets.top,
zIndex: 1000,
}} />
{children}
</ThemedView >
);
}