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.
31 lines
1.2 KiB
31 lines
1.2 KiB
import React, { FC, FocusEventHandler } from 'react'
|
|
import { Link } from 'react-router-dom'
|
|
import { faEnvelope, faIdCard } from '@fortawesome/free-solid-svg-icons'
|
|
|
|
import CheckboxField from '../forms/checkbox-field'
|
|
import TextField from '../forms/text-field'
|
|
import PasswordField from '../forms/password-field'
|
|
|
|
interface Props {
|
|
checkAvailability: FocusEventHandler<HTMLInputElement>
|
|
}
|
|
|
|
const CreateUserForm: FC<Props> = ({ checkAvailability }) => {
|
|
return (
|
|
<div className="container">
|
|
<TextField icon={faIdCard} name="user-id" label="Username" placeholder="Your Username/ID" onBlur={checkAvailability} />
|
|
<br />
|
|
<TextField name="user-name" label="Display Name" placeholder="Whatever you want to go by" />
|
|
<br />
|
|
<TextField type="email" icon={faEnvelope} name="user-email" label="Email Address" placeholder="Your email address" />
|
|
<br />
|
|
<PasswordField placeholder="Your new password" />
|
|
<br />
|
|
<CheckboxField name="group-agree">
|
|
I agree to the User <Link to="/terms">terms and conditions</Link>.
|
|
</CheckboxField>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default CreateUserForm
|