feature/default_network_editable
parent
b900da885e
commit
88665ba150
@ -0,0 +1,28 @@ |
||||
const Component = require('react').Component |
||||
const h = require('react-hyperscript') |
||||
const inherits = require('util').inherits |
||||
const AccountDropdowns = require('./components/account-dropdowns') |
||||
|
||||
inherits(AccountOptionsDropdown, Component) |
||||
function AccountOptionsDropdown () { |
||||
Component.call(this) |
||||
} |
||||
|
||||
module.exports = AccountOptionsDropdown |
||||
|
||||
// TODO: specify default props and proptypes
|
||||
// TODO: hook up to state, connect to redux to clean up API
|
||||
AccountOptionsDropdown.prototype.render = function () { |
||||
const { selected, network, identities, style, dropdownWrapperStyle, menuItemStyles } = this.props |
||||
|
||||
return h(AccountDropdowns, { |
||||
enableAccountOptions: true, |
||||
enableAccountsSelector: false, |
||||
selected: selectedAddress, |
||||
network, |
||||
identities, |
||||
style: !!style ? style : {}, |
||||
dropdownWrapperStyle: !!dropdownWrapperStyle ? dropdownWrapperStyle : {}, |
||||
menuItemStyles: !!menuItemStyles ? menuItemStyles : {}, |
||||
}, []) |
||||
} |
@ -0,0 +1,28 @@ |
||||
const Component = require('react').Component |
||||
const h = require('react-hyperscript') |
||||
const inherits = require('util').inherits |
||||
const AccountDropdowns = require('./components/account-dropdowns') |
||||
|
||||
inherits(AccountSelectionDropdown, Component) |
||||
function AccountSelectionDropdown () { |
||||
Component.call(this) |
||||
} |
||||
|
||||
module.exports = AccountSelectionDropdown |
||||
|
||||
// TODO: specify default props and proptypes
|
||||
// TODO: hook up to state, connect to redux to clean up API
|
||||
AccountSelectionDropdown.prototype.render = function () { |
||||
const { selected, network, identities, style, dropdownWrapperStyle, menuItemStyles } = this.props |
||||
|
||||
return h(AccountDropdowns, { |
||||
enableAccountOptions: false, |
||||
enableAccountsSelector: true, |
||||
selected: selectedAddress, |
||||
network, |
||||
identities, |
||||
style: !!style ? style : {}, |
||||
dropdownWrapperStyle: !!dropdownWrapperStyle ? dropdownWrapperStyle : {}, |
||||
menuItemStyles: !!menuItemStyles ? menuItemStyles : {}, |
||||
}, []) |
||||
} |
@ -1,7 +1,7 @@ |
||||
const Component = require('react').Component |
||||
const PropTypes = require('react').PropTypes |
||||
const h = require('react-hyperscript') |
||||
const MenuDroppo = require('./menu-droppo') |
||||
const MenuDroppo = require('../../menu-droppo') |
||||
const extend = require('xtend') |
||||
|
||||
const noop = () => {} |
@ -1,16 +1,18 @@ |
||||
// Reusable Dropdown Components
|
||||
// const Dropdown = require('./dropdown') //TODO: Refactor into separate components
|
||||
// const AccountDropdowns = require('./account-dropdowns')
|
||||
//TODO: Refactor into separate components
|
||||
const Dropdown = require('./components/dropdown').Dropdown |
||||
const DropdownMenuItem = require('./components/dropdown').DropdownMenuItem |
||||
const AccountDropdowns = require('./components/account-dropdowns') |
||||
|
||||
// App-Specific Instances
|
||||
// const AccountSelectionDropdown = require('./account-selection-dropdown')
|
||||
// const AccountOptionsDropdown = require('./account-options-dropdown')
|
||||
const AccountSelectionDropdown = require('./account-selection-dropdown') |
||||
const AccountOptionsDropdown = require('./account-options-dropdown') |
||||
const NetworkDropdown = require('./network-dropdown').default |
||||
|
||||
module.exports = { |
||||
// AccountSelectionDropdown,
|
||||
// AccountOptionsDropdown,
|
||||
AccountSelectionDropdown, |
||||
AccountOptionsDropdown, |
||||
NetworkDropdown, |
||||
// Dropdown,
|
||||
// AccountDropdowns,
|
||||
Dropdown, |
||||
AccountDropdowns, |
||||
} |
Loading…
Reference in new issue