fix Ticker highlight style

This commit is contained in:
Matthias Kretschmann 2019-06-04 23:17:44 +02:00
parent 06a7ad6668
commit 65204fa0ff
Signed by: m
GPG Key ID: 606EEEF3C479A91F
2 changed files with 8 additions and 3 deletions

View File

@ -50,3 +50,8 @@
.change--negative {
color: crimson;
}
.active .change--positive,
.active .change--negative {
color: #fff !important;
}

View File

@ -46,12 +46,12 @@ export default class Ticker extends PureComponent {
borderColor: accentColor
}
// convert Map to array first, cause for...of or forEach returns undefined,
// so it cannot be mapped to a collection of elements
// convert Map to array first, cause for...of or forEach returns
// undefined, so it cannot be mapped to a collection of elements
return [...prices.entries()].map(([key, value]) => (
<Item key={key} className="number-unit">
<button
className="label label--price"
className={`label label--price ${key === currency && 'active'}`}
onClick={() => toggleCurrencies(key)}
disabled={needsConfig}
style={key === currency && !needsConfig ? activeStyle : {}}