-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added payment method - bancontact card
- Loading branch information
1 parent
499f901
commit f412ca1
Showing
10 changed files
with
308 additions
and
108 deletions.
There are no files selected for viewing
Submodule ios
updated
26 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
open ReactNative | ||
open Style | ||
|
||
/** | ||
Hook returns an icon (`React.element`) for card brand. | ||
Additonaly, returns the `scan-card` button (if feature is available for the platform). | ||
*/ | ||
let useScanCardComponent = () => (~isScanCardAvailable, ~cardBrand, ~cardNumber, ~onScanCard) => { | ||
let { | ||
primaryColor, | ||
component, | ||
} = ThemebasedStyle.useThemeBasedStyle() | ||
let logger = LoggerHook.useLoggerHook() | ||
|
||
CustomInput.CustomIcon( | ||
<View style={array([viewStyle(~flexDirection=#row, ~alignItems=#center, ())])}> | ||
<Icon name={cardBrand === "" ? "waitcard" : cardBrand} height=30. width=30. fill="black" /> | ||
<UIUtils.RenderIf condition={isScanCardAvailable && cardNumber === ""}> | ||
{<> | ||
<View | ||
style={viewStyle( | ||
~backgroundColor=component.borderColor, | ||
~marginLeft=10.->dp, | ||
~marginRight=10.->dp, | ||
~height=80.->pct, | ||
~width=1.->dp, | ||
(), | ||
)} | ||
/> | ||
<TouchableOpacity | ||
style={viewStyle( | ||
~height=100.->pct, | ||
~width=27.5->dp, | ||
~display=#flex, | ||
~alignItems=#"flex-start", | ||
~justifyContent=#center, | ||
(), | ||
)} | ||
onPress={_pressEvent => { | ||
ScanCardModule.launchScanCard(onScanCard) | ||
logger(~logType=INFO, ~value="Launch", ~category=USER_EVENT, ~eventName=SCAN_CARD, ()) | ||
}}> | ||
<Icon name={"CAMERA"} height=25. width=25. fill=primaryColor /> | ||
</TouchableOpacity> | ||
</>} | ||
</UIUtils.RenderIf> | ||
</View>, | ||
) | ||
} |
Oops, something went wrong.