-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(IT Wallet): [SIW-218] Add action banner sticky component (#4721)
## Short description This PR adds an ITW action banner sticky component. It also adds the banner in message home screen.
- Loading branch information
Showing
5 changed files
with
54 additions
and
3 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
Empty file.
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,33 @@ | ||
import * as React from "react"; | ||
import { View } from "react-native"; | ||
import { Banner } from "../../../components/Banner"; | ||
import { VSpacer } from "../../../components/core/spacer/Spacer"; | ||
import I18n from "../../../i18n"; | ||
|
||
/** | ||
* The base graphical component, take a text as input and dispatch onPress when pressed | ||
* include also a close button | ||
*/ | ||
export const ItwActionBanner = (): React.ReactElement => { | ||
const viewRef = React.createRef<View>(); | ||
return ( | ||
<> | ||
<VSpacer size={24} /> | ||
<Banner | ||
testID={"ItwBannerTestID"} | ||
viewRef={viewRef} | ||
color={"neutral"} | ||
variant="big" | ||
title={I18n.t("features.itWallet.actionBanner.title")} | ||
content={I18n.t("features.itWallet.actionBanner.description")} | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
// @ts-ignore | ||
pictogramName={"setup"} | ||
action={I18n.t("features.itWallet.actionBanner.action")} | ||
labelClose={I18n.t("features.itWallet.actionBanner.hideLabel")} | ||
onPress={() => null} | ||
onClose={() => null} | ||
/> | ||
</> | ||
); | ||
}; |