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
cc69d777
Commit
cc69d777
authored
May 08, 2024
by
G
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sample, will be changed later
parent
96a9e168
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
0 deletions
+58
-0
PaymentsOptionsRendererTwoColumn.tsx
src/components/PaymentsOptionsRendererTwoColumn.tsx
+58
-0
No files found.
src/components/PaymentsOptionsRendererTwoColumn.tsx
0 → 100644
View file @
cc69d777
import
type
React
from
"react"
;
import
{
Dimensions
,
View
}
from
"react-native"
;
import
PaymentOption
from
"./PaymentOption"
;
import
Box
from
"./bases/Box"
;
const
PaymentsOptionsRendererTwoColumn
=
()
=>
{
return
(
<
View
>
<
Box
flexDirection=
{
"row"
}
justifyContent=
{
"space-between"
}
mb=
{
"s"
}
>
<
PaymentOptionContainer
>
<
PaymentOption
onPress=
{
()
=>
navigation
.
navigate
(
"paymentAmountInputScreen"
)
}
paymentMethod=
{
"OrangeMoney"
}
/>
</
PaymentOptionContainer
>
<
PaymentOptionContainer
>
<
PaymentOption
onPress=
{
()
=>
navigation
.
navigate
(
"paymentAmountInputScreen"
)
}
paymentMethod=
{
"MtnMoney"
}
/>
</
PaymentOptionContainer
>
</
Box
>
<
Box
flexDirection=
{
"row"
}
justifyContent=
{
"space-between"
}
mb=
{
"s"
}
>
<
PaymentOptionContainer
>
<
PaymentOption
onPress=
{
()
=>
navigation
.
navigate
(
"paymentAmountInputScreen"
)
}
paymentMethod=
{
"MoovMoney"
}
/>
</
PaymentOptionContainer
>
<
PaymentOptionContainer
>
<
PaymentOption
onPress=
{
()
=>
navigation
.
navigate
(
"paymentAmountInputScreen"
)
}
paymentMethod=
{
"WaveMoney"
}
/>
</
PaymentOptionContainer
>
</
Box
>
<
PaymentOptionContainer
>
<
PaymentOption
onPress=
{
()
=>
navigation
.
navigate
(
"paymentAmountInputScreen"
)
}
paymentMethod=
{
"VisaCard"
}
/>
</
PaymentOptionContainer
>
</
View
>
);
};
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
>
);
};
export
default
PaymentsOptionsRendererTwoColumn
;
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