prettyier amount rendering

This commit is contained in:
Florian Dold 2016-11-28 08:19:06 +01:00
parent 58a339cf51
commit e61aae74d7
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B

View File

@ -195,6 +195,18 @@ function ExtensionLink(props: any) {
</a>)
}
export function bigAmount(amount: AmountJson): JSX.Element {
let v = amount.value + amount.fraction / Amounts.fractionalBase;
return (
<span>
<span style={{fontSize: "300%"}}>{v}</span>
{" "}
<span>{amount.currency}</span>
</span>
);
}
class WalletBalanceView extends React.Component<any, any> {
balance: WalletBalance;
gotError = false;
@ -306,7 +318,7 @@ class WalletBalanceView extends React.Component<any, any> {
let entry: WalletBalanceEntry = wallet[key];
return (
<p>
{prettyAmount(entry.available)}
{bigAmount(entry.available)}
{" "}
{this.formatPending(entry)}
</p>