diff --git a/src/components/PaymentOption.tsx b/src/components/PaymentOption.tsx new file mode 100644 index 0000000..890e7d5 --- /dev/null +++ b/src/components/PaymentOption.tsx @@ -0,0 +1,83 @@ +import { images } from "@styles/Commons"; +import { Image, TouchableOpacity } from "react-native"; +import Box from "./bases/Box"; + +export enum PaymentMethods { + OrangeMoney = 1, + MtnMoney = 2, + MoobMoney = 3, + WaveMoney = 4, + VisaCard = 5, +} + +type PaymentOptions = "OrangeMoney" | "MtnMoney" | "MoovMoney" | "WaveMoney" | "VisaCard"; + +type Props = { + onPress: () => void; + paymentMethod: PaymentOptions; +}; + +const PaymentOptionContainer = ({ children }: { children: React.ReactNode }) => { + return ( + + {children} + + ); +}; + +const MtnMoney = () => { + return ( + + + + ); +}; + +const MoovMoney = () => { + return ( + + + + ); +}; + +const WaveMoney = () => { + return ( + + + + ); +}; + +const VisaCard = () => { + return ( + + + + ); +}; + +const PaymentOption = ({ onPress, paymentMethod }: Props) => { + return ( + + {paymentMethod === "OrangeMoney" && } + {paymentMethod === "MtnMoney" && } + {paymentMethod === "MoovMoney" && } + {paymentMethod === "WaveMoney" && } + {paymentMethod === "VisaCard" && } + + ); +}; + +const OrangeMoney = () => { + return ( + + + + ); +}; + +export default PaymentOption; diff --git a/src/screens/HomePageWithPaymentOptions.tsx b/src/screens/HomePageWithPaymentOptions.tsx index 906d326..2d6bf6c 100644 --- a/src/screens/HomePageWithPaymentOptions.tsx +++ b/src/screens/HomePageWithPaymentOptions.tsx @@ -1,31 +1,44 @@ import BalanceContainer from "@components/BalanceContainer"; import BeasyLogoIcon from "@components/BeasyLogoIcon"; import NotificationIconButton from "@components/NotificationIconButton"; +import PaymentOption from "@components/PaymentOption"; import BackgroundGreenWhiteContentArea from "@components/backgrounds/BackgroundGreenWhiteContentArea"; import Box from "@components/bases/Box"; +import Text from "@components/bases/Text"; import { SafeAreaView } from "react-native-safe-area-context"; const HomePageWithPaymentOptions = () => { return ( - - {/* HomePageWithPaymentOptions */} - - - - - + + + + + + + + + + + + Méthode de paiement + + + + {/* Payment Modes */} + {}} paymentMethod={"OrangeMoney"} /> + {}} paymentMethod={"MtnMoney"} /> + {}} paymentMethod={"MoovMoney"} /> + {}} paymentMethod={"WaveMoney"} /> + {}} paymentMethod={"VisaCard"} /> + +