diff options
author | sdtsui <szehungdanieltsui@gmail.com> | 2017-08-14 14:31:49 +0800 |
---|---|---|
committer | sdtsui <szehungdanieltsui@gmail.com> | 2017-08-14 14:31:49 +0800 |
commit | 88665ba150c74955ef11a1b3fbc0f158a1c321de (patch) | |
tree | d86b7ae10f71288d02afd2c8c2db5bbf6ec00fd6 /ui/app/components/dropdowns/account-options-dropdown.js | |
parent | b900da885ebb5b5581a670d9ca85761cecaa648f (diff) | |
download | tangerine-wallet-browser-88665ba150c74955ef11a1b3fbc0f158a1c321de.tar tangerine-wallet-browser-88665ba150c74955ef11a1b3fbc0f158a1c321de.tar.gz tangerine-wallet-browser-88665ba150c74955ef11a1b3fbc0f158a1c321de.tar.bz2 tangerine-wallet-browser-88665ba150c74955ef11a1b3fbc0f158a1c321de.tar.lz tangerine-wallet-browser-88665ba150c74955ef11a1b3fbc0f158a1c321de.tar.xz tangerine-wallet-browser-88665ba150c74955ef11a1b3fbc0f158a1c321de.tar.zst tangerine-wallet-browser-88665ba150c74955ef11a1b3fbc0f158a1c321de.zip |
Extract dropdown component into components/dropdowns, hook up to app
Diffstat (limited to 'ui/app/components/dropdowns/account-options-dropdown.js')
-rw-r--r-- | ui/app/components/dropdowns/account-options-dropdown.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/ui/app/components/dropdowns/account-options-dropdown.js b/ui/app/components/dropdowns/account-options-dropdown.js new file mode 100644 index 000000000..7d7188ec4 --- /dev/null +++ b/ui/app/components/dropdowns/account-options-dropdown.js @@ -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 : {}, + }, []) +} |