diff options
author | kumavis <kumavis@users.noreply.github.com> | 2017-01-19 04:15:58 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-19 04:15:58 +0800 |
commit | 28212d167cbd201f78e0253cf9c6fb676d71cb7a (patch) | |
tree | d278415f35a74e26459ca47f10798368e8b91403 /ui/app/components/buy-button-subview.js | |
parent | 4a0f330a066ed2a557b4622163221b410b6b6e40 (diff) | |
parent | 3273f507f7a9cf33cfdbb4fffa243d75fde98b10 (diff) | |
download | tangerine-wallet-browser-28212d167cbd201f78e0253cf9c6fb676d71cb7a.tar tangerine-wallet-browser-28212d167cbd201f78e0253cf9c6fb676d71cb7a.tar.gz tangerine-wallet-browser-28212d167cbd201f78e0253cf9c6fb676d71cb7a.tar.bz2 tangerine-wallet-browser-28212d167cbd201f78e0253cf9c6fb676d71cb7a.tar.lz tangerine-wallet-browser-28212d167cbd201f78e0253cf9c6fb676d71cb7a.tar.xz tangerine-wallet-browser-28212d167cbd201f78e0253cf9c6fb676d71cb7a.tar.zst tangerine-wallet-browser-28212d167cbd201f78e0253cf9c6fb676d71cb7a.zip |
Merge pull request #1022 from MetaMask/i715-AddImportMenu
Add ability to import private keys
Diffstat (limited to 'ui/app/components/buy-button-subview.js')
-rw-r--r-- | ui/app/components/buy-button-subview.js | 82 |
1 files changed, 46 insertions, 36 deletions
diff --git a/ui/app/components/buy-button-subview.js b/ui/app/components/buy-button-subview.js index 35eda647e..afda5bf59 100644 --- a/ui/app/components/buy-button-subview.js +++ b/ui/app/components/buy-button-subview.js @@ -7,6 +7,7 @@ const CoinbaseForm = require('./coinbase-form') const ShapeshiftForm = require('./shapeshift-form') const extension = require('../../../app/scripts/lib/extension') const Loading = require('./loading') +const TabBar = require('./tab-bar') module.exports = connect(mapStateToProps)(BuyButtonSubview) @@ -29,7 +30,6 @@ function BuyButtonSubview () { BuyButtonSubview.prototype.render = function () { const props = this.props - const currentForm = props.buyView.formView const isLoading = props.isSubLoading return ( @@ -53,43 +53,53 @@ BuyButtonSubview.prototype.render = function () { h(Loading, { isLoading }), - h('h3.flex-row.text-transform-uppercase', { - style: { - background: '#EBEBEB', - color: '#AEAEAE', - paddingTop: '4px', - justifyContent: 'space-around', + h(TabBar, { + tabs: [ + { + content: [ + 'Coinbase', + h('a', { + onClick: (event) => this.navigateTo('https://github.com/MetaMask/faq/blob/master/COINBASE.md'), + }, [ + h('i.fa.fa-question-circle', { + style: { + margin: '0px 5px', + }, + }), + ]), + ], + key: 'coinbase', + }, + { + content: [ + 'Shapeshift', + h('a', { + href: 'https://github.com/MetaMask/faq/blob/master/COINBASE.md', + onClick: (event) => this.navigateTo('https://info.shapeshift.io/about'), + }, [ + h('i.fa.fa-question-circle', { + style: { + margin: '0px 5px', + }, + }), + ]), + ], + key: 'shapeshift', + }, + ], + defaultTab: 'coinbase', + tabSelected: (key) => { + switch (key) { + case 'coinbase': + props.dispatch(actions.coinBaseSubview()) + break + case 'shapeshift': + props.dispatch(actions.shapeShiftSubview(props.provider.type)) + break + } }, - }, [ - h(currentForm.coinbase ? '.activeForm' : '.inactiveForm.pointer', { - onClick: () => props.dispatch(actions.coinBaseSubview()), - }, 'Coinbase'), - h('a', { - onClick: (event) => this.navigateTo('https://github.com/MetaMask/faq/blob/master/COINBASE.md'), - }, [ - h('i.fa.fa-question-circle', { - style: { - position: 'relative', - right: '33px', - }, - }), - ]), - h(currentForm.shapeshift ? '.activeForm' : '.inactiveForm.pointer', { - onClick: () => props.dispatch(actions.shapeShiftSubview(props.provider.type)), - }, 'Shapeshift'), + }), - h('a', { - href: 'https://github.com/MetaMask/faq/blob/master/COINBASE.md', - onClick: (event) => this.navigateTo('https://info.shapeshift.io/about'), - }, [ - h('i.fa.fa-question-circle', { - style: { - position: 'relative', - right: '28px', - }, - }), - ]), - ]), this.formVersionSubview(), ]) ) |