From f16b53d92af3884e4d2d40c6ad920439eb10bd10 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Wed, 8 Mar 2017 12:00:27 +0100 Subject: [PATCH] Adjust selection colours/display (#4811) * Adjust selection colours to match with mui * allow -> disable (simplify selections) * Only use top-border * Overlay selection line * Slightly more muted unselected * Restore address icon --- js/src/ui/AccountCard/accountCard.css | 6 ------ js/src/ui/AccountCard/accountCard.js | 14 ++++++------- js/src/ui/Form/AddressSelect/addressSelect.js | 1 - js/src/ui/SelectionList/selectionList.css | 21 ++++++++++++------- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/js/src/ui/AccountCard/accountCard.css b/js/src/ui/AccountCard/accountCard.css index 44012cab0..e6cafe656 100644 --- a/js/src/ui/AccountCard/accountCard.css +++ b/js/src/ui/AccountCard/accountCard.css @@ -110,12 +110,6 @@ overflow: hidden; text-overflow: ellipsis; font-size: 0.9em; - - .address { - &:hover { - cursor: text; - } - } } .accountName { diff --git a/js/src/ui/AccountCard/accountCard.js b/js/src/ui/AccountCard/accountCard.js index d7b455132..b5746bf82 100644 --- a/js/src/ui/AccountCard/accountCard.js +++ b/js/src/ui/AccountCard/accountCard.js @@ -28,15 +28,15 @@ import styles from './accountCard.css'; export default class AccountCard extends Component { static propTypes = { account: PropTypes.object.isRequired, - allowAddressClick: PropTypes.bool, balance: PropTypes.object, className: PropTypes.string, + disableAddressClick: PropTypes.bool, onClick: PropTypes.func, onFocus: PropTypes.func }; static defaultProps = { - allowAddressClick: false + disableAddressClick: false }; state = { @@ -138,14 +138,14 @@ export default class AccountCard extends Component { } handleAddressClick = (event) => { - const { allowAddressClick } = this.props; + const { disableAddressClick } = this.props; - // Don't stop the event if address click is allowed - if (allowAddressClick) { - return this.onClick(event); + // Stop the event if address click is disallowed + if (disableAddressClick) { + return this.preventEvent(event); } - return this.preventEvent(event); + return this.onClick(event); } handleKeyDown = (event) => { diff --git a/js/src/ui/Form/AddressSelect/addressSelect.js b/js/src/ui/Form/AddressSelect/addressSelect.js index 785a8fa65..511ab930f 100644 --- a/js/src/ui/Form/AddressSelect/addressSelect.js +++ b/js/src/ui/Form/AddressSelect/addressSelect.js @@ -348,7 +348,6 @@ class AddressSelect extends Component { return (