Last active
April 22, 2018 11:06
-
-
Save kettanaito/5ec1864ca98acef499f07569b1c0297b to your computer and use it in GitHub Desktop.
React Advanced Form - Field group
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// src/app/RegistrationForm.jsx | |
import React from 'react'; | |
import { Form, Field } from 'react-advanced-form'; | |
import { Input } from '...'; | |
export default class RegistrationForm extends React.Component { | |
render() { | |
<Form> | |
<Field.Group name="primaryInfo"> | |
<Input | |
name="userEmail" | |
type="email" | |
required /> | |
</Field.Group> | |
<Input | |
name="userPassword" | |
type="password" | |
required /> | |
<Input | |
name="confirmPassword" | |
type="password" | |
required /> | |
<Field.Group name="primaryInfo"> | |
<Input | |
name="firstName" /> | |
<Input | |
name="lastName" /> | |
</Field.Group> | |
<button>Register</button> | |
</Form> | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment