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} >
> <SafeAreaViewTopLeftRightFull>{children}</SafeAreaViewTopLeftRightFull>
{children} </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 <Box
style={{ px={"l"}
height: "100%", flexDirection={"row"}
width: "100%", justifyContent={"space-between"}
}} alignItems={"center"}
mb={"m"}
> >
<Box <BeasyLogoIcon />
px={"l"}
flexDirection={"row"}
justifyContent={"space-between"}
alignItems={"center"}
mb={"m"}
>
<BeasyLogoIcon />
</Box>
<WrapperTopEdgeCurved>{children}</WrapperTopEdgeCurved>
</Box> </Box>
</SafeAreaView> <WrapperTopEdgeCurved>{children}</WrapperTopEdgeCurved>
</SafeAreaViewTopLeftRightFull>
</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