diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-11-28 08:19:06 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-11-28 08:19:06 +0100 |
commit | e61aae74d7551582d2eaa498665a96c012a16019 (patch) | |
tree | 3ccf2f2d1cf8c3bda19c56567f8f2aa3e2328b36 /src | |
parent | 58a339cf511eb1b6cb274725be55801b5e306504 (diff) |
prettyier amount rendering
Diffstat (limited to 'src')
-rw-r--r-- | src/popup/popup.tsx | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/popup/popup.tsx b/src/popup/popup.tsx index 47dbd0b8f..dd87963c6 100644 --- a/src/popup/popup.tsx +++ b/src/popup/popup.tsx @@ -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> |