Working add/remove fields for var. length #3314

This commit is contained in:
Nicolas Gotchac
2016-11-14 17:00:36 +01:00
parent 046d2f2333
commit 9e2214c513
4 changed files with 82 additions and 26 deletions

View File

@@ -39,6 +39,10 @@
position: absolute;
left: 0;
top: 35px;
&.noLabel {
top: 11px;
}
}
.paddedInput input {

View File

@@ -106,15 +106,21 @@ export default class AddressSelect extends Component {
}
renderIdentityIcon (inputValue) {
const { error, value } = this.props;
const { error, value, label } = this.props;
if (error || !inputValue || value.length !== 42) {
return null;
}
const classes = [ styles.icon ];
if (!label) {
classes.push(styles.noLabel);
}
return (
<IdentityIcon
className={ styles.icon }
className={ classes.join(' ') }
inline center
address={ value } />
);