Created
February 5, 2020 10:56
-
-
Save chitru/f30952360290b89922b5790a14f02636 to your computer and use it in GitHub Desktop.
MultiStepForm
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
| import React from "react"; | |
| const Review = ({ setForm, formData, navigation }) => { | |
| const { | |
| firstName, | |
| lastName, | |
| nickName, | |
| address, | |
| city, | |
| state, | |
| zip, | |
| phone, | |
| } = formData; | |
| const { go } = navigation; | |
| return ( | |
| <div className="form"> | |
| <h3>Review your data</h3> | |
| <h4> | |
| Name | |
| <button onClick={() => go("names")}>Edit</button> | |
| </h4> | |
| <div> | |
| {" "} | |
| First name: {`${firstName}`}, | |
| <br /> | |
| Last Name: {`${lastName}`}, | |
| </div> | |
| <div>Nick Name: {`${nickName}`}</div> | |
| <h4> | |
| Address | |
| <button onClick={() => go("address")}>Edit</button> | |
| </h4> | |
| <div> | |
| Address: {`${address}`}, | |
| <br /> | |
| City: {` ${city}`}, | |
| <br /> | |
| State: {`${state}`}, | |
| <br /> | |
| ZIP: {`${zip}`} | |
| </div> | |
| <h4> | |
| Contact | |
| <button onClick={() => go("contact")}>Edit</button> | |
| </h4> | |
| <div> | |
| Phone: {`${phone}`}, | |
| <br /> | |
| E-mail: {`${email}`} | |
| </div> | |
| <div> | |
| <button onClick={() => go("submit")}>Submit</button> | |
| </div> | |
| </div> | |
| ); | |
| }; | |
| export default Review; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment