1
0
mirror of https://github.com/kremalicious/blowfish.git synced 2024-12-29 16:17:52 +01:00

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 { .change--negative {
color: crimson; 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 borderColor: accentColor
} }
// convert Map to array first, cause for...of or forEach returns undefined, // convert Map to array first, cause for...of or forEach returns
// so it cannot be mapped to a collection of elements // undefined, so it cannot be mapped to a collection of elements
return [...prices.entries()].map(([key, value]) => ( return [...prices.entries()].map(([key, value]) => (
<Item key={key} className="number-unit"> <Item key={key} className="number-unit">
<button <button
className="label label--price" className={`label label--price ${key === currency && 'active'}`}
onClick={() => toggleCurrencies(key)} onClick={() => toggleCurrencies(key)}
disabled={needsConfig} disabled={needsConfig}
style={key === currency && !needsConfig ? activeStyle : {}} style={key === currency && !needsConfig ? activeStyle : {}}