Created
February 5, 2020 11:00
-
-
Save chitru/f2b68a6123ef02e65a04d28b34251820 to your computer and use it in GitHub Desktop.
MultiStepFrom
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