You need to sign in or sign up before continuing.
Commit ffaf8a62 by G

fix the odd rounding, use square image and overflow hidden combine with gap from parent

parent aa40c36c
assets/operators/moov_money.png

9.21 KB | W: | H:

assets/operators/moov_money.png

8.64 KB | W: | H:

assets/operators/moov_money.png
assets/operators/moov_money.png
assets/operators/moov_money.png
assets/operators/moov_money.png
  • 2-up
  • Swipe
  • Onion skin
assets/operators/mtn_money.png

5.79 KB | W: | H:

assets/operators/mtn_money.png

5.29 KB | W: | H:

assets/operators/mtn_money.png
assets/operators/mtn_money.png
assets/operators/mtn_money.png
assets/operators/mtn_money.png
  • 2-up
  • Swipe
  • Onion skin
assets/operators/orange_money.png

2.12 KB | W: | H:

assets/operators/orange_money.png

1.51 KB | W: | H:

assets/operators/orange_money.png
assets/operators/orange_money.png
assets/operators/orange_money.png
assets/operators/orange_money.png
  • 2-up
  • Swipe
  • Onion skin
assets/operators/visa_card.png

2.51 KB | W: | H:

assets/operators/visa_card.png

1.92 KB | W: | H:

assets/operators/visa_card.png
assets/operators/visa_card.png
assets/operators/visa_card.png
assets/operators/visa_card.png
  • 2-up
  • Swipe
  • Onion skin
assets/operators/wave_money.png

4.47 KB | W: | H:

assets/operators/wave_money.png

3.92 KB | W: | H:

assets/operators/wave_money.png
assets/operators/wave_money.png
assets/operators/wave_money.png
assets/operators/wave_money.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -19,12 +19,30 @@ type Props = {
const PaymentOptionContainer = ({ children }: { children: React.ReactNode }) => {
return (
<Box height={50} p={"s"} style={{ width: "100%", height: "100%" }} overflow={"hidden"}>
<Box
height={50}
// p={"s"}
style={{ width: "100%", height: "100%" }}
overflow={"hidden"}
backgroundColor={"yellow"}
borderRadius={30}
>
{children}
</Box>
);
};
const OrangeMoney = () => {
return (
<PaymentOptionContainer>
<Image
source={require("../../assets/operators/orange_money.png")}
style={images.cover}
/>
</PaymentOptionContainer>
);
};
const MtnMoney = () => {
return (
<PaymentOptionContainer>
......@@ -59,7 +77,7 @@ const VisaCard = () => {
const PaymentOption = ({ onPress, paymentMethod }: Props) => {
return (
<TouchableOpacity style={{ width: "50%", height: "26%" }} onPress={onPress}>
<TouchableOpacity style={{ width: "48%", height: "26%" }} onPress={onPress}>
{paymentMethod === "OrangeMoney" && <OrangeMoney />}
{paymentMethod === "MtnMoney" && <MtnMoney />}
{paymentMethod === "MoovMoney" && <MoovMoney />}
......@@ -69,15 +87,4 @@ const PaymentOption = ({ onPress, paymentMethod }: Props) => {
);
};
const OrangeMoney = () => {
return (
<Box height={50} p={"s"} style={{ width: "100%", height: "100%" }} overflow={"hidden"}>
<Image
source={require("../../assets/operators/orange_money.png")}
style={images.cover}
/>
</Box>
);
};
export default PaymentOption;
......@@ -30,7 +30,12 @@ const HomePageWithPaymentOptions = () => {
Méthode de paiement
</Text>
</Box>
<Box flexDirection={"row"} style={{ flexWrap: "wrap" }}>
<Box
flexDirection={"row"}
style={{ flexWrap: "wrap" }}
gap={"s"}
justifyContent={"space-between"}
>
{/* Payment Modes */}
<PaymentOption onPress={() => {}} paymentMethod={"OrangeMoney"} />
<PaymentOption onPress={() => {}} paymentMethod={"MtnMoney"} />
......
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