From 1ab5a6e556be51d6e47a2e0e06a1bc15d221a368 Mon Sep 17 00:00:00 2001 From: G Date: Thu, 25 Apr 2024 11:24:30 +0000 Subject: [PATCH] use custom wrapper BackgroundGreenWhiteContent --- src/components/backgrounds/BackgroundGreenWhiteContentArea.tsx | 20 ++++++++++++++++++++ src/screens/UserLoginScreen.tsx | 87 +++++++++++++++++++++++++++++++++++++++++---------------------------------------------- 2 files changed, 61 insertions(+), 46 deletions(-) create mode 100644 src/components/backgrounds/BackgroundGreenWhiteContentArea.tsx diff --git a/src/components/backgrounds/BackgroundGreenWhiteContentArea.tsx b/src/components/backgrounds/BackgroundGreenWhiteContentArea.tsx new file mode 100644 index 0000000..097a6dc --- /dev/null +++ b/src/components/backgrounds/BackgroundGreenWhiteContentArea.tsx @@ -0,0 +1,20 @@ +import { containers, images } from "@styles/Commons"; +import { ImageBackground, View } from "react-native"; + +type Props = { children: React.ReactNode }; + +const BackgroundGreenWhiteContentArea = ({ children }: Props) => { + return ( + + + {children} + + + ); +}; + +export default BackgroundGreenWhiteContentArea; diff --git a/src/screens/UserLoginScreen.tsx b/src/screens/UserLoginScreen.tsx index 8b6e4ec..6926d70 100644 --- a/src/screens/UserLoginScreen.tsx +++ b/src/screens/UserLoginScreen.tsx @@ -1,60 +1,55 @@ import Button from "@components/Button"; import Input from "@components/Input"; +import BackgroundGreenWhiteContentArea from "@components/backgrounds/BackgroundGreenWhiteContentArea"; import Box from "@components/bases/Box"; import Text from "@components/bases/Text"; -import { containers, images } from "@styles/Commons"; -import { ImageBackground, KeyboardAvoidingView, Platform, View } from "react-native"; +import { containers } from "@styles/Commons"; +import { KeyboardAvoidingView, Platform, View } from "react-native"; const UserLoginScreen = () => { return ( - - + - - - - - - Connexion - - Bienvenue, vous nous avez manqué ! - + + + + Connexion + + Bienvenue, vous nous avez manqué ! + - - - - - - - -