]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/Cryptoportfolio/Front.git/blobdiff - cmd/web/js/balance.jsx
Reliable icon provider for cryptocurrencies logo : Bitonics.
[perso/Immae/Projets/Cryptomonnaies/Cryptoportfolio/Front.git] / cmd / web / js / balance.jsx
index 515a7ede549b040c1a2bf1506bd598f2eb6e5c72..19155118e97d29782126eb5917ed564733cfd33e 100644 (file)
@@ -4,10 +4,10 @@ import classnames from 'classnames';
 
 class CurrencyLogo extends React.Component {
     render = () => {
-      var className = classnames('cc', this.props.currency, 'currency-logo');
+      var className = classnames('bt', 'bt-' + this.props.currency.toLowerCase(), 'currency-logo');
       return <i className={className}
-                title={this.props.currency}
-                alt={this.props.currency}></i>;
+                aria-hidden="true"
+                title={this.props.currency}></i>;
     }
  }
 
@@ -95,4 +95,16 @@ class PFBalance extends React.Component {
     }
 }
 
-export {PFBalance, Assets};
+class PFBalanceMinimal extends React.Component {
+    render = () => {
+        return <React.Fragment>
+            <div className="balance">
+              <div className="col-12">
+                <CurrencyLogo currency="BTC" /> <span><strong>{this.props.balance}</strong> <strong>{formatVariation(this.props.variationP)}</strong></span>
+              </div>
+            </div>
+        </React.Fragment>;
+    }
+}
+
+export {PFBalance, Assets, PFBalanceMinimal};