Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
beasy-mobile
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
4
Issues
4
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
G
beasy-mobile
Commits
eca08b09
Commit
eca08b09
authored
Apr 27, 2024
by
G
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enforce a more consistent rectangle shape across different screen size.
all payment option will lead to the default input page for now
parent
63980e25
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
24 deletions
+47
-24
HomePageWithPaymentOptions.tsx
src/screens/HomePageWithPaymentOptions.tsx
+47
-24
No files found.
src/screens/HomePageWithPaymentOptions.tsx
View file @
eca08b09
...
@@ -6,6 +6,7 @@ import PaymentOption from "@components/PaymentOption";
...
@@ -6,6 +6,7 @@ import PaymentOption from "@components/PaymentOption";
import
BackgroundGreenWhiteContentArea
from
"@components/backgrounds/BackgroundGreenWhiteContentArea"
;
import
BackgroundGreenWhiteContentArea
from
"@components/backgrounds/BackgroundGreenWhiteContentArea"
;
import
Box
from
"@components/bases/Box"
;
import
Box
from
"@components/bases/Box"
;
import
Text
from
"@components/bases/Text"
;
import
Text
from
"@components/bases/Text"
;
import
{
Dimensions
}
from
"react-native"
;
import
{
SafeAreaView
}
from
"react-native-safe-area-context"
;
import
{
SafeAreaView
}
from
"react-native-safe-area-context"
;
const
HomePageWithPaymentOptions
:
PaymentStackScreenComponentProps
<
"homePageWithPaymentOptions"
>
=
const
HomePageWithPaymentOptions
:
PaymentStackScreenComponentProps
<
"homePageWithPaymentOptions"
>
=
...
@@ -32,37 +33,48 @@ const HomePageWithPaymentOptions: PaymentStackScreenComponentProps<"homePageWith
...
@@ -32,37 +33,48 @@ const HomePageWithPaymentOptions: PaymentStackScreenComponentProps<"homePageWith
Méthode de paiement
Méthode de paiement
</
Text
>
</
Text
>
</
Box
>
</
Box
>
<
Box
<
Box
flexDirection=
{
"row"
}
justifyContent=
{
"space-between"
}
mb=
{
"s"
}
>
flexDirection=
{
"row"
}
<
PaymentOptionContainer
>
style=
{
{
flexWrap
:
"wrap"
}
}
gap=
{
"s"
}
justifyContent=
{
"space-between"
}
>
{
/* Payment Modes */
}
<
Box
style=
{
{
width
:
"48%"
,
height
:
"26%"
}
}
>
<
PaymentOption
<
PaymentOption
onPress=
{
()
=>
onPress=
{
()
=>
navigation
.
navigate
(
"paymentAmountInputScreen"
)
navigation
.
navigate
(
"paymentAmountInputScreen"
)
}
}
paymentMethod=
{
"OrangeMoney"
}
paymentMethod=
{
"OrangeMoney"
}
/>
/>
</
Box
>
</
PaymentOptionContainer
>
<
Box
style=
{
{
width
:
"48%"
,
height
:
"26%"
}
}
>
<
PaymentOptionContainer
>
<
PaymentOption
onPress=
{
()
=>
{}
}
paymentMethod=
{
"MtnMoney"
}
/>
<
PaymentOption
</
Box
>
onPress=
{
()
=>
navigation
.
navigate
(
"paymentAmountInputScreen"
)
<
Box
style=
{
{
width
:
"48%"
,
height
:
"26%"
}
}
>
}
<
PaymentOption
onPress=
{
()
=>
{}
}
paymentMethod=
{
"MoovMoney"
}
/>
paymentMethod=
{
"MtnMoney"
}
</
Box
>
/>
</
PaymentOptionContainer
>
<
Box
style=
{
{
width
:
"48%"
,
height
:
"26%"
}
}
>
</
Box
>
<
PaymentOption
onPress=
{
()
=>
{}
}
paymentMethod=
{
"WaveMoney"
}
/>
<
Box
flexDirection=
{
"row"
}
justifyContent=
{
"space-between"
}
mb=
{
"s"
}
>
</
Box
>
<
PaymentOptionContainer
>
<
PaymentOption
<
Box
style=
{
{
width
:
"48%"
,
height
:
"26%"
}
}
>
onPress=
{
()
=>
<
PaymentOption
onPress=
{
()
=>
{}
}
paymentMethod=
{
"VisaCard"
}
/>
navigation
.
navigate
(
"paymentAmountInputScreen"
)
</
Box
>
}
paymentMethod=
{
"MoovMoney"
}
/>
</
PaymentOptionContainer
>
<
PaymentOptionContainer
>
<
PaymentOption
onPress=
{
()
=>
navigation
.
navigate
(
"paymentAmountInputScreen"
)
}
paymentMethod=
{
"WaveMoney"
}
/>
</
PaymentOptionContainer
>
</
Box
>
</
Box
>
<
PaymentOptionContainer
>
<
PaymentOption
onPress=
{
()
=>
navigation
.
navigate
(
"paymentAmountInputScreen"
)
}
paymentMethod=
{
"VisaCard"
}
/>
</
PaymentOptionContainer
>
</
Box
>
</
Box
>
</
Box
>
</
Box
>
</
SafeAreaView
>
</
SafeAreaView
>
...
@@ -71,3 +83,14 @@ const HomePageWithPaymentOptions: PaymentStackScreenComponentProps<"homePageWith
...
@@ -71,3 +83,14 @@ const HomePageWithPaymentOptions: PaymentStackScreenComponentProps<"homePageWith
};
};
export
default
HomePageWithPaymentOptions
;
export
default
HomePageWithPaymentOptions
;
const
screenWidth
=
Dimensions
.
get
(
"window"
).
width
;
const
paymentOptionCardWidth
=
screenWidth
/
2
-
30
;
const
paymentOptionCardHeight
=
paymentOptionCardWidth
*
0.65
;
const
PaymentOptionContainer
=
({
children
}:
{
children
:
React
.
ReactNode
})
=>
{
return
(
<
Box
width=
{
paymentOptionCardWidth
}
height=
{
paymentOptionCardHeight
}
>
{
children
}
</
Box
>
);
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment