March 2019
Intermediate to advanced
534 pages
14h 52m
English
Let's write some code that showcases various label, placeholder, and helperText configurations you can use with the TextField component:
import React from 'react';import { withStyles } from '@material-ui/core/styles';import Grid from '@material-ui/core/Grid';import TextField from '@material-ui/core/TextField';const styles = theme => ({ container: { margin: theme.spacing(2) }});const PlaceholderAndHelperText = withStyles(styles)(({ classes }) => ( <Grid container spacing={4} className={classes.container}> <Grid item> <TextField label="The Value" /> </Grid> <Grid item> <TextField placeholder="Example Value" /> </Grid> <Grid item> <TextField helperText="Brief explanation of the value" /> </Grid> <Grid item> <TextField label="The ...Read now
Unlock full access