Last active
March 21, 2018 17:54
-
-
Save viniciusdacal/26a6c5d572399892e1b6d1537f475225 to your computer and use it in GitHub Desktop.
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
const UserForm = ({ onChange, values }) => ( | |
<div> | |
<h1>User</h1> | |
<div> | |
<div className="row"> | |
<div className="form-group"> | |
<label>Name</label> | |
<input type="text" name="name" value={values.name} onChange={onChange} /> | |
</div> | |
<div className="form-group"> | |
<label>Email</label> | |
<input type="email" name="email" value={values.email} onChange={onChange} /> | |
</div> | |
</div> | |
<div className="row"> | |
<div className="form-group"> | |
<label>Country</label> | |
<CountrySelector name="country" value={values.country} onChange={onChange} /> | |
</div> | |
<div className="form-group"> | |
<label>Province</label> | |
{values.country | |
? <ProvinceSelector name="province" value={values.province} onChange={onChange} /> | |
: <span>Select a country first</span> | |
} | |
</div> | |
</div> | |
</div> | |
</div> | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment