I have a basic Grid
using a spacing of 5
. I want that spacing not to happen at the xs
breakpoint. How can I remove it on the xs
breakpoint?
You can see a demo here.
import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import Grid from '@material-ui/core/Grid';
import Paper from '@material-ui/core/Paper';
const useStyles = makeStyles(theme => ({
root: {
flexGrow: 1,
},
paper: {
height: 140,
width: 100,
},
}));
export default function SpacingGrid() {
const classes = useStyles();
return (
<Grid container justify="center" spacing={5}>
<Grid item>
<Paper className={classes.paper} />
</Grid>
<Grid item>
<Paper className={classes.paper} />
</Grid>
<Grid item>
<Paper className={classes.paper} />
</Grid>
</Grid>
);
}