From c2105c4070c63c7ad6fbdc4c5be8f3f182a16b52 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Mon, 12 Sep 2016 08:29:18 -0700 Subject: Fix account list formatting when only a single item. - Makes account list items no longer flex larger than they should be. - Makes the add account button not flex larger than it should be. - Adds a line under the add account button to define its size. --- ui/app/accounts/account-list-item.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'ui/app/accounts/account-list-item.js') diff --git a/ui/app/accounts/account-list-item.js b/ui/app/accounts/account-list-item.js index 0b4acdfec..4e0d69ed7 100644 --- a/ui/app/accounts/account-list-item.js +++ b/ui/app/accounts/account-list-item.js @@ -7,14 +7,14 @@ const EthBalance = require('../components/eth-balance') const CopyButton = require('../components/copyButton') const Identicon = require('../components/identicon') -module.exports = NewComponent +module.exports = AccountListItem -inherits(NewComponent, Component) -function NewComponent () { +inherits(AccountListItem, Component) +function AccountListItem () { Component.call(this) } -NewComponent.prototype.render = function () { +AccountListItem.prototype.render = function () { const identity = this.props.identity var isSelected = this.props.selectedAddress === identity.address var account = this.props.accounts[identity.address] @@ -23,9 +23,6 @@ NewComponent.prototype.render = function () { return ( h(`.accounts-list-option.flex-row.flex-space-between.pointer.hover-white${selectedClass}`, { key: `account-panel-${identity.address}`, - style: { - flex: '1 0 auto', - }, onClick: (event) => this.props.onShowDetail(identity.address, event), }, [ @@ -73,7 +70,7 @@ NewComponent.prototype.render = function () { ) } -NewComponent.prototype.pendingOrNot = function () { +AccountListItem.prototype.pendingOrNot = function () { const pending = this.props.pending if (pending.length === 0) return null return h('.pending-dot', pending.length) -- cgit