diff options
Add import account placeholder template
Diffstat (limited to 'ui/app/accounts/import')
-rw-r--r-- | ui/app/accounts/import/index.js | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/ui/app/accounts/import/index.js b/ui/app/accounts/import/index.js new file mode 100644 index 000000000..a16b1c39d --- /dev/null +++ b/ui/app/accounts/import/index.js @@ -0,0 +1,70 @@ +const inherits = require('util').inherits +const Component = require('react').Component +const h = require('react-hyperscript') +const connect = require('react-redux').connect +import Select from 'react-select' + +module.exports = connect(mapStateToProps)(AccountImportSubview) + +function mapStateToProps (state) { + return { + types: state.metamask.keyringTypes, + } +} + +inherits(AccountImportSubview, Component) +function AccountImportSubview () { + Component.call(this) +} + +AccountImportSubview.prototype.render = function () { + const props = this.props + const state = this.state || {} + const { types } = props + const { type } = state + + return ( + h('div', { + style: { + }, + }, [ + h('div', { + style: { + padding: '10px', + background: 'rgb(242,242,242)', + color: 'rgb(174, 174, 174)', + }, + }, [ + h('h3', 'SELECT TYPE'), + ]), + + h('style', ` + .has-value.Select--single > .Select-control .Select-value .Select-value-label, .Select-value-label { + color: rgb(174,174,174); + } + `), + + h('div', { + style: { + padding: '10px', + }, + }, [ + h(Select, { + name: 'import-type-select', + clearable: false, + value: type || types[0], + options: types.map((type) => { + return { + value: type, + label: type, + } + }), + onChange: (opt) => { + this.setState({ type: opt.value }) + }, + }) + ]) + ]) + ) +} + |