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/tab-bar.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/tab-bar.js')
-rw-r--r-- | ui/app/components/tab-bar.js | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/ui/app/components/tab-bar.js b/ui/app/components/tab-bar.js new file mode 100644 index 000000000..65078e0a4 --- /dev/null +++ b/ui/app/components/tab-bar.js @@ -0,0 +1,35 @@ +const Component = require('react').Component +const h = require('react-hyperscript') +const inherits = require('util').inherits + +module.exports = TabBar + +inherits(TabBar, Component) +function TabBar () { + Component.call(this) +} + +TabBar.prototype.render = function () { + const props = this.props + const state = this.state || {} + const { tabs = [], defaultTab, tabSelected } = props + const { subview = defaultTab } = state + + return ( + h('.flex-row.space-around.text-transform-uppercase', { + style: { + background: '#EBEBEB', + color: '#AEAEAE', + paddingTop: '4px', + }, + }, tabs.map((tab) => { + const { key, content } = tab + return h(subview === key ? '.activeForm' : '.inactiveForm.pointer', { + onClick: () => { + this.setState({ subview: key }) + tabSelected(key) + }, + }, content) + })) + ) +} |