June 2018
Intermediate to advanced
302 pages
6h 48m
English
In this section, we'll change the text input in the modal form using the Material-UI TextField component. Add the following import statement to the AddCar.js file:
import TextField from '@material-ui/core/TextField';
Then, change the input to the TextField components in the form. We are using the label props to set the labels of the TextField components:
render() { return ( <div> <SkyLight hideOnOverlayClicked ref="addDialog"> <h3>New car</h3> <form> <TextField label="Brand" placeholder="Brand" name="brand" onChange={this.handleChange}/><br/> <TextField label="Model" placeholder="Model" name="model" onChange={this.handleChange}/><br/> <TextField label="Color" placeholder="Color" name="color" onChange={this.handleChange}/><br/> ...Read now
Unlock full access