UNPKG

materialuiupgraded

Version:

Material-UI's workspace package

54 lines (48 loc) 1.35 kB
import React from 'react'; import PropTypes from 'prop-types'; import Paper from '@material-ui/core/Paper'; import { withStyles } from '@material-ui/core/styles'; import Grid from '@material-ui/core/Grid'; const styles = { root: { width: 400, }, paper: { padding: 16, textAlign: 'center', }, }; function SimpleGrid(props) { const { classes } = props; return ( <div className={classes.root}> <Grid container spacing={24}> <Grid item xs={12}> <Paper className={classes.paper}>xs=12</Paper> </Grid> <Grid item xs={6}> <Paper className={classes.paper}>xs=6</Paper> </Grid> <Grid item xs={6}> <Paper className={classes.paper}>xs=6</Paper> </Grid> <Grid item xs={3}> <Paper className={classes.paper}>xs=3</Paper> </Grid> <Grid item xs={3}> <Paper className={classes.paper}>xs=3</Paper> </Grid> <Grid item xs={3}> <Paper className={classes.paper}>xs=3</Paper> </Grid> <Grid item xs={3}> <Paper className={classes.paper}>xs=3</Paper> </Grid> </Grid> </div> ); } SimpleGrid.propTypes = { classes: PropTypes.object.isRequired, }; export default withStyles(styles)(SimpleGrid);