fix: user email verify style

This commit is contained in:
Sean Yesmunt 2018-04-02 22:40:04 -04:00
parent 4c112d91d2
commit e21caa19f9

View file

@ -2,7 +2,7 @@
/* eslint-disable */ /* eslint-disable */
import React from 'react'; import React from 'react';
import Button from 'component/button'; import Button from 'component/button';
import { Form, FormField, Submit } from 'component/common/form'; import { Form, FormField, FormRow, Submit } from 'component/common/form';
class UserEmailVerify extends React.PureComponent { class UserEmailVerify extends React.PureComponent {
constructor(props) { constructor(props) {
@ -11,6 +11,8 @@ class UserEmailVerify extends React.PureComponent {
this.state = { this.state = {
code: '', code: '',
}; };
this.handleSubmit = this.handleSubmit.bind(this);
} }
handleCodeChanged(event) { handleCodeChanged(event) {
@ -31,31 +33,30 @@ class UserEmailVerify extends React.PureComponent {
render() { render() {
const { cancelButton, errorMessage, email, isPending } = this.props; const { cancelButton, errorMessage, email, isPending } = this.props;
// <FormField
// label={__('Verification Code')}
// errorMessage={errorMessage}
// render{() => (
// <input
// name="code"
// value={this.state.code}
// onChange={event => {
// this.handleCodeChanged(event);
// }}
// />
// )}
// />
return ( return (
<Form onSubmit={this.handleSubmit.bind(this)}> <Form onSubmit={this.handleSubmit}>
<p>Please enter the verification code emailed to {email}.</p> <p>Please enter the verification code emailed to {email}.</p>
{/* render help separately so it always shows */} <FormRow>
<div className="form-field__helper"> <FormField
stretch
name="code"
type="text"
placeholder="eyJyZWNhcHRjaGEiOiIw..."
label={__('Verification Code')}
error={errorMessage}
value={this.state.code}
onChange={event => this.handleCodeChanged(event)}
/>
</FormRow>
<div className="help">
<p> <p>
{__('Email')} <Button href="mailto:help@lbry.io" label="help@lbry.io" /> or join our{' '} {__('Email')} <Button button="link" href="mailto:help@lbry.io" label="help@lbry.io" />{' '}
<Button href="https://chat.lbry.io" label="chat" />{' '} or join our <Button button="link" href="https://chat.lbry.io" label="chat" />{' '}
{__('if you encounter any trouble with your code.')} {__('if you encounter any trouble with your code.')}
</p> </p>
</div> </div>
<div className="form-row-submit"> <div className="card__actions">
<Submit label={__('Verify')} disabled={isPending} /> <Submit label={__('Verify')} disabled={isPending} />
{cancelButton} {cancelButton}
</div> </div>