1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-24 19:10:22 +01:00
metamask-extension/ui/app/components/modals/new-account-modal.js

71 lines
1.4 KiB
JavaScript
Raw Normal View History

2017-08-21 04:28:20 +02:00
const Component = require('react').Component
const h = require('react-hyperscript')
const inherits = require('util').inherits
const connect = require('react-redux').connect
const actions = require('../../actions')
function mapStateToProps (state) {
return {
network: state.metamask.network,
address: state.metamask.selectedAddress,
}
}
function mapDispatchToProps (dispatch) {
return {
toCoinbase: (address) => {
dispatch(actions.buyEth({ network: '1', address, amount: 0 }))
},
hideModal: () => {
dispatch(actions.hideModal())
},
2017-08-21 04:28:20 +02:00
}
}
2017-08-21 15:14:28 +02:00
inherits(NewAccountModal, Component)
function NewAccountModal () {
2017-08-21 04:28:20 +02:00
Component.call(this)
}
2017-08-21 15:14:28 +02:00
module.exports = connect(mapStateToProps, mapDispatchToProps)(NewAccountModal)
2017-08-21 04:28:20 +02:00
2017-08-21 15:14:28 +02:00
NewAccountModal.prototype.render = function () {
2017-08-21 04:28:20 +02:00
return h('div', {}, [
2017-08-21 15:14:28 +02:00
h('div.new-account-modal-wrapper', {
2017-08-21 04:28:20 +02:00
}, [
2017-08-21 15:14:28 +02:00
h('div', {}, [
'New Account',
2017-08-21 04:28:20 +02:00
]),
2017-08-21 15:14:28 +02:00
h('div', {}, [
h('i.fa.fa-times', {}, [
2017-08-21 04:28:20 +02:00
]),
2017-08-21 15:14:28 +02:00
]),
h('div', {}, [
'Account Name',
]),
2017-08-21 04:28:20 +02:00
2017-08-21 15:14:28 +02:00
h('div', {}, [
h('input', {
placeholder: 'E.g. My new account'
}, []),
]),
2017-08-21 04:28:20 +02:00
2017-08-21 15:14:28 +02:00
h('div', {}, [
'or',
]),
2017-08-21 04:28:20 +02:00
2017-08-21 15:14:28 +02:00
h('div', {}, [
'Import an account',
2017-08-21 04:28:20 +02:00
]),
2017-08-21 15:14:28 +02:00
h('div', {}, [
h('button.btn-clear', {}, [
'SAVE',
]),
]),
2017-08-21 04:28:20 +02:00
])
])
}