24 lines
748 B
TypeScript
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 >
|
|
);
|
|
} |