aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/accounts
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-11-05 05:39:53 +0800
committerDan Finlay <dan@danfinlay.com>2016-11-05 05:39:53 +0800
commita7af47db928590af8100f16e9e9d36ae98623357 (patch)
tree4857f878f71b5208cc3d8b6e35c546829629d29d /ui/app/accounts
parent055ef5d8fe6ccefbc4229bcb05bad2e8c5cd97d6 (diff)
downloadtangerine-wallet-browser-a7af47db928590af8100f16e9e9d36ae98623357.tar
tangerine-wallet-browser-a7af47db928590af8100f16e9e9d36ae98623357.tar.gz
tangerine-wallet-browser-a7af47db928590af8100f16e9e9d36ae98623357.tar.bz2
tangerine-wallet-browser-a7af47db928590af8100f16e9e9d36ae98623357.tar.lz
tangerine-wallet-browser-a7af47db928590af8100f16e9e9d36ae98623357.tar.xz
tangerine-wallet-browser-a7af47db928590af8100f16e9e9d36ae98623357.tar.zst
tangerine-wallet-browser-a7af47db928590af8100f16e9e9d36ae98623357.zip
Add import account placeholder template
Diffstat (limited to 'ui/app/accounts')
-rw-r--r--ui/app/accounts/import.js30
-rw-r--r--ui/app/accounts/import/index.js70
2 files changed, 70 insertions, 30 deletions
diff --git a/ui/app/accounts/import.js b/ui/app/accounts/import.js
deleted file mode 100644
index d15b30fd2..000000000
--- a/ui/app/accounts/import.js
+++ /dev/null
@@ -1,30 +0,0 @@
-const inherits = require('util').inherits
-const Component = require('react').Component
-const h = require('react-hyperscript')
-const connect = require('react-redux').connect
-
-module.exports = connect(mapStateToProps)(COMPONENTNAME)
-
-function mapStateToProps (state) {
- return {}
-}
-
-inherits(COMPONENTNAME, Component)
-function COMPONENTNAME () {
- Component.call(this)
-}
-
-COMPONENTNAME.prototype.render = function () {
- const props = this.props
-
- return (
- h('div', {
- style: {
- background: 'blue',
- },
- }, [
- `Hello, ${props.sender}`,
- ])
- )
-}
-
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 })
+ },
+ })
+ ])
+ ])
+ )
+}
+