-
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.
feat(Bonus Pagamenti Digitali): [#175797741] Cashback milestone compo…
…nent (#2408) * [#175797741] Creates cashback milestone component * [#175797741] Missing files * [#175797741] Fixes lint Co-authored-by: Fabrizio <[email protected]>
- Loading branch information
1 parent
b5e4772
commit 6d07afc
Showing
5 changed files
with
73 additions
and
12 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
47 changes: 47 additions & 0 deletions
47
ts/features/bonus/bpd/screens/details/transaction/BpdCashbackMilestoneComponent.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,47 @@ | ||
import { View } from "native-base"; | ||
import * as React from "react"; | ||
import { Image, StyleSheet } from "react-native"; | ||
import { IOColors } from "../../../../../../components/core/variables/IOColors"; | ||
import fireworksIcon from "../../../../../../../img/bonus/bpd/fireworks.png"; | ||
import { formatNumberAmount } from "../../../../../../utils/stringBuilder"; | ||
import { H4 } from "../../../../../../components/core/typography/H4"; | ||
import { IOStyles } from "../../../../../../components/core/variables/IOStyles"; | ||
import I18n from "../../../../../../i18n"; | ||
|
||
type Props = { | ||
cashbackValue: number; | ||
}; | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
flexDirection: "row", | ||
alignItems: "center", | ||
justifyContent: "space-between", | ||
backgroundColor: IOColors.blue, | ||
paddingVertical: 16 | ||
}, | ||
image: { width: 32, height: 32, resizeMode: "cover" }, | ||
textPadding: { | ||
paddingHorizontal: 16 | ||
} | ||
}); | ||
const BpdCashbackMilestoneComponent: React.FunctionComponent<Props> = ( | ||
props: Props | ||
) => ( | ||
<View style={[styles.container, IOStyles.horizontalContentPadding]}> | ||
<Image source={fireworksIcon} style={styles.image} /> | ||
<View style={styles.textPadding}> | ||
<H4 color={"white"} weight={"SemiBold"}> | ||
{I18n.t( | ||
"bonus.bpd.details.transaction.detail.summary.milestone.title", | ||
{ cashbackValue: formatNumberAmount(props.cashbackValue, true) } | ||
)} | ||
</H4> | ||
<H4 color={"white"} weight={"Regular"}> | ||
{I18n.t("bonus.bpd.details.transaction.detail.summary.milestone.body")} | ||
</H4> | ||
</View> | ||
</View> | ||
); | ||
|
||
export default BpdCashbackMilestoneComponent; |
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