Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
[beta] UI backports (#4818)
Browse files Browse the repository at this point in the history
* Update the key (#4817)

* 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

* Fix default values for contract queries
  • Loading branch information
jacogr committed Mar 8, 2017
1 parent f9a0aa0 commit af826f8
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 27 deletions.
2 changes: 1 addition & 1 deletion js/src/contracts/code/wallet.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions js/src/ui/AccountCard/accountCard.css
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,6 @@
overflow: hidden;
text-overflow: ellipsis;
font-size: 0.9em;

.address {
&:hover {
cursor: text;
}
}
}

.accountName {
Expand Down
14 changes: 7 additions & 7 deletions js/src/ui/AccountCard/accountCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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) => {
Expand Down
1 change: 0 additions & 1 deletion js/src/ui/Form/AddressSelect/addressSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,6 @@ class AddressSelect extends Component {
return (
<AccountCard
account={ account }
allowAddressClick
balance={ balance }
className={ styles.account }
key={ `account_${index}` }
Expand Down
21 changes: 14 additions & 7 deletions js/src/ui/SelectionList/selectionList.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/

.item {
border: 2px solid transparent;
cursor: pointer;
display: flex;
flex: 1;
Expand All @@ -25,7 +24,6 @@
width: 100%;

&:hover {
border-color: transparent;
filter: none;
opacity: 1;
}
Expand All @@ -35,7 +33,7 @@
width: 100%;

&:hover {
background-color: rgba(255, 255, 255, 0.5);
background-color: rgba(255, 255, 255, 0.15);
}
}

Expand Down Expand Up @@ -68,15 +66,24 @@
}

.selected {
border-color: rgba(255, 255, 255, 0.25);
filter: none;

&.default {
border-color: rgba(255, 255, 255, 0.75);
&::after {
background: rgb(0, 151, 167);
content: '';
height: 4px;
left: 0;
position: absolute;
right: 0;
top: 0;
}

&.default::after {
background: rgb(167, 151, 0);
}
}

.unselected {
filter: grayscale(10%);
filter: grayscale(50%);
opacity: 0.75;
}
Loading

0 comments on commit af826f8

Please sign in to comment.