Skip to content

Instantly share code, notes, and snippets.

@chitru
Created February 5, 2020 10:55
Show Gist options
  • Save chitru/a7d9bcfe021954ae1b774c15561133c8 to your computer and use it in GitHub Desktop.
Save chitru/a7d9bcfe021954ae1b774c15561133c8 to your computer and use it in GitHub Desktop.
MultiStepForm
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