-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(Bonus Pagamenti Digitali): [#176069568] Why other cards? (#2546)
* [#176069568] why other cards? * [#176069568] comment Co-authored-by: Matteo Boschi <[email protected]>
- Loading branch information
1 parent
2fe78cc
commit 89f0bb9
Showing
4 changed files
with
78 additions
and
4 deletions.
There are no files selected for viewing
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
58 changes: 58 additions & 0 deletions
58
ts/features/bonus/bpd/screens/details/components/bottomsheet/WhyOtherCards.tsx
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,58 @@ | ||
import { View } from "native-base"; | ||
import * as React from "react"; | ||
import { StyleSheet } from "react-native"; | ||
import ButtonDefaultOpacity from "../../../../../../../components/ButtonDefaultOpacity"; | ||
import { Body } from "../../../../../../../components/core/typography/Body"; | ||
import { Link } from "../../../../../../../components/core/typography/Link"; | ||
import { IOColors } from "../../../../../../../components/core/variables/IOColors"; | ||
import I18n from "../../../../../../../i18n"; | ||
import { useIOBottomSheet } from "../../../../../../../utils/bottomSheet"; | ||
import { openWebUrl } from "../../../../../../../utils/url"; | ||
|
||
const styles = StyleSheet.create({ | ||
link: { | ||
backgroundColor: IOColors.white, | ||
borderColor: IOColors.white, | ||
paddingRight: 0, | ||
paddingLeft: 0 | ||
} | ||
}); | ||
|
||
const findOutMore = "https://io.italia.it/cashback/faq/#n31"; | ||
|
||
/** | ||
* Explains why there are other cards | ||
* @constructor | ||
*/ | ||
export const WhyOtherCards = () => ( | ||
<View> | ||
<View spacer={true} /> | ||
<View style={{ flex: 1 }}> | ||
<Body> | ||
{I18n.t( | ||
"bonus.bpd.details.paymentMethods.activateOnOthersChannel.whyOtherCards.body" | ||
)} | ||
</Body> | ||
<ButtonDefaultOpacity | ||
onPress={() => openWebUrl(findOutMore)} | ||
onPressWithGestureHandler={true} | ||
style={styles.link} | ||
> | ||
<Link> | ||
{I18n.t( | ||
"bonus.bpd.details.paymentMethods.activateOnOthersChannel.whyOtherCards.cta" | ||
)} | ||
</Link> | ||
</ButtonDefaultOpacity> | ||
</View> | ||
</View> | ||
); | ||
|
||
export const useWhyOtherCardsBottomSheet = () => | ||
useIOBottomSheet( | ||
<WhyOtherCards />, | ||
I18n.t( | ||
"bonus.bpd.details.paymentMethods.activateOnOthersChannel.whyOtherCards.title" | ||
), | ||
300 | ||
); |