Skip to content
This repository has been archived by the owner on Oct 6, 2023. It is now read-only.

Commit

Permalink
fix Ticker highlight style
Browse files Browse the repository at this point in the history
  • Loading branch information
kremalicious committed Jun 4, 2019
1 parent 06a7ad6 commit 65204fa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions src/renderer/components/Ticker.css
Expand Up @@ -50,3 +50,8 @@
.change--negative {
color: crimson;
}

.active .change--positive,
.active .change--negative {
color: #fff !important;
}
6 changes: 3 additions & 3 deletions src/renderer/components/Ticker.jsx
Expand Up @@ -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 : {}}
Expand Down

0 comments on commit 65204fa

Please sign in to comment.