Browse Source

add warning flag too

gre-patch-1
Gaëtan Renaudeau 6 years ago
parent
commit
882b00619c
No known key found for this signature in database GPG Key ID: 7B66B85F042E5451
  1. 11
      src/components/CurrenciesStatusBanner.js
  2. 1
      src/reducers/currenciesStatus.js

11
src/components/CurrenciesStatusBanner.js

@ -116,7 +116,11 @@ class BannerItem extends PureComponent<{
render() {
const { item, t } = this.props
return (
<Box relative key={item.id} style={styles.banner}>
<Box
relative
key={item.id}
style={{ ...styles.banner, ...(item.warning ? styles.warning : null) }}
>
<CloseIcon onClick={this.dismiss} />
<Box horizontal flow={2}>
<IconTriangleWarning height={16} width={16} color="white" />
@ -159,8 +163,11 @@ const styles = {
left: 32,
bottom: 32,
},
warning: {
background: colors.orange,
},
banner: {
background: colors.alertRed,
background: colors.warning,
overflow: 'hidden',
borderRadius: 4,
fontSize: 13,

1
src/reducers/currenciesStatus.js

@ -15,6 +15,7 @@ export type CurrencyStatus = {
message: string,
link: string,
nonce: number,
warning?: boolean, // display as a warning
keepSync?: boolean, // even if something is happening, make live still stay in sync
}

Loading…
Cancel
Save