Created
February 5, 2020 10:59
-
-
Save chitru/b449f8f9f39723a0e4943095acaf5d74 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 states = [ | |
| ["NSW", "New South Wales"], | |
| ["VIC", "Victoria"], | |
| ["WA", "Western Australia"] | |
| ]; | |
| const StateDrop = ({ label, ...others }) => ( | |
| <> | |
| <label>{label}</label> | |
| <select {...others}> | |
| {states.map(([value, name]) => ( | |
| <option value={value}>{name}</option> | |
| ))} | |
| </select> | |
| </> | |
| ); | |
| export default StateDrop; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment