diff options
author | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-12-14 06:27:27 +0800 |
---|---|---|
committer | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-12-14 06:27:27 +0800 |
commit | 68787056768e834d44ecc23a400036292410dcf6 (patch) | |
tree | 6568a5b49d0f3bfb28bfd546a9350dcec9c7c2a9 /packages | |
parent | 9697d66b66a9c8ae9f350aae8cf0d6b951a3c96b (diff) | |
download | dexon-sol-tools-68787056768e834d44ecc23a400036292410dcf6.tar dexon-sol-tools-68787056768e834d44ecc23a400036292410dcf6.tar.gz dexon-sol-tools-68787056768e834d44ecc23a400036292410dcf6.tar.bz2 dexon-sol-tools-68787056768e834d44ecc23a400036292410dcf6.tar.lz dexon-sol-tools-68787056768e834d44ecc23a400036292410dcf6.tar.xz dexon-sol-tools-68787056768e834d44ecc23a400036292410dcf6.tar.zst dexon-sol-tools-68787056768e834d44ecc23a400036292410dcf6.zip |
Show @ price in light grey
Diffstat (limited to 'packages')
-rw-r--r-- | packages/instant/src/components/order_details.tsx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/packages/instant/src/components/order_details.tsx b/packages/instant/src/components/order_details.tsx index 96bdb7150..33a115044 100644 --- a/packages/instant/src/components/order_details.tsx +++ b/packages/instant/src/components/order_details.tsx @@ -117,7 +117,7 @@ export class OrderDetails extends React.Component<OrderDetailsProps> { } } - private _assetAmountLabel(): string { + private _assetAmountLabel(): React.ReactNode { const { assetName, baseCurrency } = this.props; const numTokens = this.props.selectedAssetUnitAmount; @@ -127,13 +127,14 @@ export class OrderDetails extends React.Component<OrderDetailsProps> { ? new BigNumber(0) : numTokens; if (!_.isUndefined(displayNumTokens)) { - let numTokensWithSymbol = displayNumTokens.toString(); + let numTokensWithSymbol: React.ReactNode = displayNumTokens.toString(); if (assetName) { numTokensWithSymbol += ` ${assetName}`; } const pricePerTokenWei = this._pricePerTokenWei(); if (pricePerTokenWei) { - numTokensWithSymbol += ` @ ${this._displayAmount(baseCurrency, pricePerTokenWei)}`; + const atPriceDisplay = <Text fontColor={ColorOption.lightGrey}>@ {this._displayAmount(baseCurrency, pricePerTokenWei)}</Text>; + numTokensWithSymbol = <React.Fragment>{numTokensWithSymbol} {atPriceDisplay}</React.Fragment> } return numTokensWithSymbol; } @@ -185,7 +186,7 @@ export class OrderDetails extends React.Component<OrderDetailsProps> { } export interface OrderDetailsRowProps { - labelText: string; + labelText: React.ReactNode; isLabelBold?: boolean; isPrimaryValueBold?: boolean; primaryValue: React.ReactNode; |