Created
February 5, 2020 10:55
-
-
Save chitru/a7d9bcfe021954ae1b774c15561133c8 to your computer and use it in GitHub Desktop.
MultiStepForm
This file contains 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
import React from "react"; | |
import ItemForm from "./ItemForm"; | |
const Contact = ({ setForm, formData, navigation }) => { | |
const { phone, email } = formData; | |
const { previous, next } = navigation; | |
return ( | |
<div className="form"> | |
<h3>Contact </h3> | |
<ItemForm label="Phone" name="phone" value={phone} onChange={setForm} /> | |
<ItemForm label="E-mail" name="email" value={email} onChange={setForm} /> | |
<div> | |
<button onClick={previous}>Previous</button> | |
<button onClick={next}>Next</button> | |
</div> | |
</div> | |
); | |
}; | |
export default Contact; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment