diff options
author | Chi Kei Chan <chikeichan@gmail.com> | 2018-01-20 07:29:36 +0800 |
---|---|---|
committer | Chi Kei Chan <chikeichan@gmail.com> | 2018-01-20 07:29:36 +0800 |
commit | 77c545336b38aefc6105cde1799b18066df8bef9 (patch) | |
tree | 121a140131c8cb1f4b746d8f37d4a403b0910aad /ui/app/components/send/gas-fee-display-v2.js | |
parent | 98b5a62fa74aa6730a25df28dfe5032cfb487697 (diff) | |
parent | 4e63924e607a07f94ff0a741a036ab352b0b7a3f (diff) | |
download | tangerine-wallet-browser-77c545336b38aefc6105cde1799b18066df8bef9.tar tangerine-wallet-browser-77c545336b38aefc6105cde1799b18066df8bef9.tar.gz tangerine-wallet-browser-77c545336b38aefc6105cde1799b18066df8bef9.tar.bz2 tangerine-wallet-browser-77c545336b38aefc6105cde1799b18066df8bef9.tar.lz tangerine-wallet-browser-77c545336b38aefc6105cde1799b18066df8bef9.tar.xz tangerine-wallet-browser-77c545336b38aefc6105cde1799b18066df8bef9.tar.zst tangerine-wallet-browser-77c545336b38aefc6105cde1799b18066df8bef9.zip |
Merge branch 'uat' into newmaster
Diffstat (limited to 'ui/app/components/send/gas-fee-display-v2.js')
-rw-r--r-- | ui/app/components/send/gas-fee-display-v2.js | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/ui/app/components/send/gas-fee-display-v2.js b/ui/app/components/send/gas-fee-display-v2.js new file mode 100644 index 000000000..0c4c3f7a9 --- /dev/null +++ b/ui/app/components/send/gas-fee-display-v2.js @@ -0,0 +1,44 @@ +const Component = require('react').Component +const h = require('react-hyperscript') +const inherits = require('util').inherits +const CurrencyDisplay = require('./currency-display') + +module.exports = GasFeeDisplay + +inherits(GasFeeDisplay, Component) +function GasFeeDisplay () { + Component.call(this) +} + +GasFeeDisplay.prototype.render = function () { + const { + conversionRate, + gasTotal, + onClick, + primaryCurrency = 'ETH', + convertedCurrency, + } = this.props + + return h('div.send-v2__gas-fee-display', [ + + gasTotal + ? h(CurrencyDisplay, { + primaryCurrency, + convertedCurrency, + value: gasTotal, + conversionRate, + convertedPrefix: '$', + readOnly: true, + }) + : h('div.currency-display', 'Loading...'), + + h('button.send-v2__sliders-icon-container', { + onClick, + disabled: !gasTotal, + }, [ + h('i.fa.fa-sliders.send-v2__sliders-icon'), + ]), + + ]) +} + |