March 2019
Intermediate to advanced
534 pages
14h 52m
English
Let's fix the text wrapping in both of the Paper components in this example. The following is a modified version:
import React, { Fragment } from 'react';import clsx from 'clsx';import { withStyles } from '@material-ui/core/styles';import Typography from '@material-ui/core/Typography';import Paper from '@material-ui/core/Paper';const styles = theme => ({ paper: { minWidth: 300, padding: theme.spacing(2), margin: theme.spacing(3) }, fixedHeight: { height: 100 }, responsive: { [theme.breakpoints.down('xs')]: { overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' } }});const WrappingText = withStyles(styles)(({ classes }) => ( <Fragment> <Paper className={classes.paper}> <Typography noWrap> Lorem ipsum dolor sit ...Read now
Unlock full access