Newer
Older
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
// This file is part of Parity.
//
// SPDX-License-Identifier: MIT
import { inject, observer } from 'mobx-react';
import { Link } from 'react-router-dom';
import CreateAccountHeader from '../CreateAccountHeader';
class CreateAccountStep1 extends Component {
this.props.createAccountStore.generateNewAccount();
}
handleChangeIsImporting = ({ target: { checked } }) =>
this.props.createAccountStore.setIsImporting(checked);
handleChangeName = ({ target: { value } }) =>
this.props.createAccountStore.setName(value);
createAccountStore: { address, generateNewAccount, isImporting, name }
{!isImporting &&
<div className='box -pull-up text -right'>
<button
onClick={generateNewAccount}
className='button -tiny -reload'
>
Regenerate address
</button>
</div>}
<div className='form_field'>
<label>Name</label>
<input
required
placeholder='Enter a name for this account'
value={name}
/>
<label>
Import existing account<input
checked={isImporting}
onChange={this.handleChangeIsImporting}
type='checkbox'
/>
</label>
<button className='button'>Next</button>
</Link>
: <button className='button' disabled>
Next
</button>}
</div>
);
}
}
export default CreateAccountStep1;