Daniel Ternyak 37008e9fe9 Complete Generate/Create Wallet Flow (#38)
* GenerateWallet: Download real UTC file.

* Paper wallet (#45)

* Working paper wallet (#52)

* Reset Generate Wallet state when component will unmount
2017-07-16 16:02:13 -05:00

45 lines
1.2 KiB
JavaScript

import React, { Component } from 'react';
import PropTypes from 'prop-types';
export default class PasswordInput extends Component {
constructor(props) {
super(props);
}
static propTypes = {
showPasswordGenerateWallet: 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"
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.showPasswordGenerateWallet}
aria-label="make password visible"
role="button"
className="input-group-addon eye"
/>
</div>
</div>
</div>
);
}
}