You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.7 KiB
59 lines
1.7 KiB
import React, { FC } from 'react'
|
|
import noop from 'lodash/noop'
|
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
|
import { faUser, faArrowLeft } from '@fortawesome/free-solid-svg-icons'
|
|
|
|
import CreateUserForm from '../create-user-form'
|
|
|
|
export interface Props {
|
|
userId?: string
|
|
name?: string
|
|
email?: string
|
|
password?: string
|
|
agree?: boolean
|
|
previous?: () => void
|
|
next?: (userId: string, name: string, email: string, password: string, agree: boolean) => void
|
|
register: () => void
|
|
}
|
|
|
|
const CreateUserStep: FC<Props> = ({
|
|
userId = '',
|
|
name = '',
|
|
email = '',
|
|
password = '',
|
|
agree = false,
|
|
previous = noop,
|
|
next = noop,
|
|
}) => (
|
|
<div className="centered-content">
|
|
<div className="centered-content-icon">
|
|
<span className="icon is-large has-text-primary">
|
|
<FontAwesomeIcon icon={faUser} size="lg" />
|
|
</span>
|
|
</div>
|
|
|
|
<CreateUserForm />
|
|
<hr />
|
|
|
|
<nav className="level">
|
|
<div className="level-left">
|
|
<p className="level-item">
|
|
<button className="button" onClick={() => previous()}>
|
|
<span className="icon is-small">
|
|
<FontAwesomeIcon icon={faArrowLeft} />
|
|
</span>
|
|
<span>Community</span>
|
|
</button>
|
|
</p>
|
|
</div>
|
|
|
|
<div className="level-right">
|
|
<p className="level-item">
|
|
<button className="button is-success" onClick={() => next(userId, name, email, password, agree)}>Finish</button>
|
|
</p>
|
|
</div>
|
|
</nav>
|
|
</div>
|
|
)
|
|
|
|
export default CreateUserStep
|