Queries display IdentityIcons (#3453)

This commit is contained in:
Jaco Greeff
2016-11-15 19:08:16 +01:00
committed by GitHub
parent 039bd3c9f9
commit 6efdc08044
5 changed files with 58 additions and 29 deletions

View File

@@ -30,6 +30,10 @@
.iconDisabled {
position: absolute;
top: 35px;
&.noLabel {
top: 10px;
}
}
.icon {

View File

@@ -69,14 +69,19 @@ class InputAddress extends Component {
}
renderIcon () {
const { value, disabled } = this.props;
const { value, disabled, label } = this.props;
if (!value || !value.length || !util.isAddressValid(value)) {
return null;
}
const classes = [disabled ? styles.iconDisabled : styles.icon];
if (!label) {
classes.push(styles.noLabel);
}
return (
<div className={ disabled ? styles.iconDisabled : styles.icon }>
<div className={ classes.join(' ') }>
<IdentityIcon
inline center
address={ value } />