MyCrypto/common/containers/Tabs/GenerateWallet/components/GenerateWalletPasswordInput...

41 lines
1.4 KiB
React
Raw Normal View History

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