Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add banner to transaction failure screen
- Loading branch information
1 parent
0e14164
commit 8fb0167
Showing
9 changed files
with
47 additions
and
20 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
...ser-view/components/CustomSubmitApiWarningBanner/CustomSubmitApiWarningBanner.module.scss
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,7 @@ | ||
.exclamationIcon { | ||
height: 72px !important; | ||
} | ||
|
||
.message { | ||
text-align: left; | ||
} |
21 changes: 21 additions & 0 deletions
21
...ews/browser-view/components/CustomSubmitApiWarningBanner/CustomSubmitApiWarningBanner.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,21 @@ | ||
import React from 'react'; | ||
import ExclamationIcon from '@assets/icons/exclamation-triangle-red.component.svg'; | ||
import styles from './CustomSubmitApiWarningBanner.module.scss'; | ||
import { useWalletStore } from '@stores'; | ||
import { useTranslation } from 'react-i18next'; | ||
import { Banner } from '@lace/common'; | ||
|
||
export const CustomSubmitApiWarningBanner = () => { | ||
const { isCustomSubmitApiEnabled } = useWalletStore(); | ||
const { t } = useTranslation(); | ||
|
||
return ( | ||
isCustomSubmitApiEnabled && ( | ||
<Banner | ||
message={<div className={styles.message}>{t('browserView.transaction.send.customSubmitApiBannerText')}</div>} | ||
withIcon | ||
customIcon={<ExclamationIcon className={styles.exclamationIcon} />} | ||
/> | ||
) | ||
); | ||
}; |
1 change: 1 addition & 0 deletions
1
...-extension-wallet/src/views/browser-view/components/CustomSubmitApiWarningBanner/index.ts
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 @@ | ||
export * from './CustomSubmitApiWarningBanner'; |
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 |
---|---|---|
|
@@ -73,7 +73,3 @@ | |
text-align: center; | ||
} | ||
} | ||
|
||
.exclamationIcon { | ||
height: 72px !important; | ||
} |
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 |
---|---|---|
|
@@ -8,3 +8,7 @@ | |
flex: 1; | ||
justify-content: center; | ||
} | ||
|
||
.message { | ||
margin-bottom: 34px; | ||
} |
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