Add user prop to CommentEditor
This commit is contained in:
parent
90d1e1a040
commit
3ffd391cb0
@ -1,5 +1,5 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import {Control, Field, Input as I, Label} from 'bloomer'
|
import {Control, Field, Input as I, Heading} from 'bloomer'
|
||||||
import {IconType} from 'react-icons'
|
import {IconType} from 'react-icons'
|
||||||
|
|
||||||
export interface IInputProps {
|
export interface IInputProps {
|
||||||
@ -24,7 +24,7 @@ export class Input extends React.PureComponent<IInputProps> {
|
|||||||
const {Icon} = this.props
|
const {Icon} = this.props
|
||||||
return (
|
return (
|
||||||
<Field>
|
<Field>
|
||||||
<Label>{this.props.label}</Label>
|
<Heading>{this.props.label}</Heading>
|
||||||
<Control hasIcons>
|
<Control hasIcons>
|
||||||
<I
|
<I
|
||||||
className='input'
|
className='input'
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
|
import {FaUser, FaLock} from 'react-icons/fa'
|
||||||
import {INewUser, IUser} from '@rondo/common'
|
import {INewUser, IUser} from '@rondo/common'
|
||||||
import {Input} from '../components/Input'
|
import {Input} from '../components/Input'
|
||||||
import {Redirect} from '../components/Redirect'
|
import {Redirect} from '../components/Redirect'
|
||||||
@ -21,6 +22,7 @@ export class RegisterForm extends React.PureComponent<IRegisterFormProps> {
|
|||||||
<form onSubmit={this.props.onSubmit}>
|
<form onSubmit={this.props.onSubmit}>
|
||||||
<p className='error'>{this.props.error}</p>
|
<p className='error'>{this.props.error}</p>
|
||||||
<Input
|
<Input
|
||||||
|
Icon={FaUser}
|
||||||
label='Email'
|
label='Email'
|
||||||
name='username'
|
name='username'
|
||||||
type='email'
|
type='email'
|
||||||
@ -30,6 +32,7 @@ export class RegisterForm extends React.PureComponent<IRegisterFormProps> {
|
|||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
<Input
|
<Input
|
||||||
|
Icon={FaLock}
|
||||||
label='Password'
|
label='Password'
|
||||||
name='password'
|
name='password'
|
||||||
type='password'
|
type='password'
|
||||||
@ -56,12 +59,14 @@ export class RegisterForm extends React.PureComponent<IRegisterFormProps> {
|
|||||||
placeholder='First name'
|
placeholder='First name'
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
<input
|
<div className='text-center'>
|
||||||
className='button is-primary'
|
<input
|
||||||
name='submit'
|
className='button is-primary'
|
||||||
type='submit'
|
name='submit'
|
||||||
value='Log In'
|
type='submit'
|
||||||
/>
|
value='Register'
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user