Commit 95884de2 by G

feat: BarnoinPayBackground component providing a good background image that…

feat: BarnoinPayBackground component providing a good background image that spans even the status bar and include a safeArea on the top.
parent 557164bc
import { asp as g } from "@asp/asp";
import { ImageBackground } from "expo-image";
import type { FC } from "react";
import type { ViewProps } from "react-native";
import { useSafeAreaInsets } from "react-native-safe-area-context";
export const BarnoinPayBackground: FC<ViewProps> = ({ children, style, ...rest }) => {
const insets = useSafeAreaInsets();
return (
<ImageBackground
style={[g.flex_1, { paddingTop: insets.top }, style]}
source={require("@assets/background.png")}
{...rest}
>
{children}
</ImageBackground>
);
};
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