Skip to content

Commit

Permalink
add different levels and add alert as well (5,10)
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Schiessl <stefan.schiessl@blockchainprojectsbv.com>
  • Loading branch information
Stefan Schiessl authored and gades committed Aug 3, 2019
1 parent dfb6004 commit 97da408
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions app/assets/stylesheets/themes/_theme-template.scss
Expand Up @@ -415,6 +415,7 @@
color: $warning-color;
}
.txtlabel.cancel,
.txtlabel.alert,
.label.alert {
color: $alert-color;
}
Expand Down
9 changes: 5 additions & 4 deletions app/components/Blockchain/Asset.jsx
Expand Up @@ -1505,11 +1505,12 @@ class Asset extends React.Component {
{this.formattedPrice(item, true)}(
<span
className={
median_offset > 1 || median_offset < -1
? "txtlabel warning"
: "txtlabel success"
Math.abs(median_offset) > 10
? "txtlabel alert"
: Math.abs(median_offset) > 5
? "txtlabel warning"
: "txtlabel success"
}
style={{fontSize: "90%"}}
>
{median_offset}%
</span>
Expand Down

0 comments on commit 97da408

Please sign in to comment.