Created
November 8, 2018 11:48
-
-
Save cbrannen9a/f8f41a6df8ded43ff5ff307cc692e305 to your computer and use it in GitHub Desktop.
Partial Address Form adding value and change handling
This file contains 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
function AddressForm(props) { | |
const { state, handleChange } = props; | |
return ( | |
<Fragment> | |
<Typography variant="h6" gutterBottom> | |
Shipping address | |
</Typography> | |
<Grid container spacing={24}> | |
<Grid item xs={12} sm={6}> | |
<TextField | |
required | |
id="firstName" | |
name="firstName" | |
label="First name" | |
fullWidth | |
autoComplete="fname" | |
value={state.addressForm.firstName} | |
onChange={handleChange('firstName', 'addressForm')} | |
/> | |
</Grid> | |
//... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment