This commit is contained in:
Daniel Ternyak 2017-06-20 01:14:23 -05:00
parent 3644cb5515
commit ff81133b5e

View File

@ -1,10 +1,9 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
export default class GenerateWalletPasswordInputComponent extends Component { export default class GenerateWalletPasswordInputComponent extends Component {
constructor(props) { constructor(props) {
super(props) super(props);
} }
static propTypes = { static propTypes = {
@ -14,27 +13,32 @@ export default class GenerateWalletPasswordInputComponent extends Component {
meta: PropTypes.object meta: PropTypes.object
}; };
render() { render() {
return ( return (
<div> <div>
<div> <div>
<div className="input-group" style={{ width: '100%' }}> <div className="input-group" style={{ width: '100%' }}>
<input {...this.props.input} <input
{...this.props.input}
name="password" name="password"
className={this.props.meta.error ? 'form-control is-invalid' : 'form-control'} className={
this.props.meta.error
? 'form-control is-invalid'
: 'form-control'
}
type={this.props.showPassword ? 'text' : 'password'} type={this.props.showPassword ? 'text' : 'password'}
placeholder="Do NOT forget to save this!" placeholder="Do NOT forget to save this!"
aria-label="Enter a strong password (at least 9 characters)"/> aria-label="Enter a strong password (at least 9 characters)"
/>
<span <span
onClick={() => this.props.generateWalletShowPassword()} onClick={() => this.props.generateWalletShowPassword()}
aria-label="make password visible" aria-label="make password visible"
role="button" role="button"
className="input-group-addon eye"/> className="input-group-addon eye"
/>
</div> </div>
</div> </div>
</div> </div>
) );
} }
} }