Commit 0db3e2e3 by G

using the new container component SafeArea. remove marginTop as it will be handled by the wrapper

parent 38463045
import { containers, images } from "@styles/Commons"; import SafeAreaViewTopLeftRightFull from "@components/containers/SafeAreaViewTopLeftRightFull";
import { ImageBackground, View } from "react-native"; import { images } from "@styles/Commons";
import { ImageBackground } from "react-native";
type Props = { children: React.ReactNode }; type Props = { children: React.ReactNode };
const BackgroundDefault = ({ children }: Props) => { const BackgroundDefault = ({ children }: Props) => {
return ( return (
<View style={containers.containerFull}>
<ImageBackground <ImageBackground
source={require("../../../assets/beasy_default.png")} source={require("../../../assets/beasy_default.png")}
style={images.background} style={images.background}
> >
{children} <SafeAreaViewTopLeftRightFull>{children}</SafeAreaViewTopLeftRightFull>
</ImageBackground> </ImageBackground>
</View>
); );
}; };
......
import BeasyLogoIcon from "@components/BeasyLogoIcon"; import BeasyLogoIcon from "@components/BeasyLogoIcon";
import WrapperTopEdgeCurved from "@components/WrapperTopEdgeCurved"; import WrapperTopEdgeCurved from "@components/WrapperTopEdgeCurved";
import Box from "@components/bases/Box"; import Box from "@components/bases/Box";
import SafeAreaViewTopLeftRightFull from "@components/containers/SafeAreaViewTopLeftRightFull";
import type { ReactElement } from "react"; import type { ReactElement } from "react";
import { SafeAreaView } from "react-native-safe-area-context";
import BackgroundDefault from "./BackgroundDefault"; import BackgroundDefault from "./BackgroundDefault";
const BackgroundWithBeasyIconAndWhiteContentArea = ({ children }: { children?: ReactElement }) => { const BackgroundWithBeasyIconAndWhiteContentArea = ({ children }: { children?: ReactElement }) => {
return ( return (
<BackgroundDefault> <BackgroundDefault>
<SafeAreaView edges={["top", "left", "right"]}> <SafeAreaViewTopLeftRightFull>
<Box
style={{
height: "100%",
width: "100%",
}}
>
<Box <Box
px={"l"} px={"l"}
flexDirection={"row"} flexDirection={"row"}
...@@ -25,8 +19,7 @@ const BackgroundWithBeasyIconAndWhiteContentArea = ({ children }: { children?: R ...@@ -25,8 +19,7 @@ const BackgroundWithBeasyIconAndWhiteContentArea = ({ children }: { children?: R
<BeasyLogoIcon /> <BeasyLogoIcon />
</Box> </Box>
<WrapperTopEdgeCurved>{children}</WrapperTopEdgeCurved> <WrapperTopEdgeCurved>{children}</WrapperTopEdgeCurved>
</Box> </SafeAreaViewTopLeftRightFull>
</SafeAreaView>
</BackgroundDefault> </BackgroundDefault>
); );
}; };
......
...@@ -82,7 +82,7 @@ const PaymentAmountInputScreen: PaymentStackScreenComponentProps<"paymentAmountI ...@@ -82,7 +82,7 @@ const PaymentAmountInputScreen: PaymentStackScreenComponentProps<"paymentAmountI
style={{ style={{
height: "100%", height: "100%",
width: "100%", width: "100%",
marginTop: insets.top, // marginTop: insets.top,
}} }}
> >
<Box <Box
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment