Add user prop to CommentEditor

This commit is contained in:
Jerko Steiner 2019-04-14 22:06:55 +12:00
parent 90d1e1a040
commit 3ffd391cb0
2 changed files with 13 additions and 8 deletions

View File

@ -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'

View File

@ -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
/> />
<div className='text-center'>
<input <input
className='button is-primary' className='button is-primary'
name='submit' name='submit'
type='submit' type='submit'
value='Log In' value='Register'
/> />
</div>
</form> </form>
) )
} }