1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
import React from 'react';
import PropTypes from 'prop-types';
import compose from 'recompose/compose';
import { withStyles } from '@material-ui/core/styles';
import { Paper, Grid, withWidth, Typography } from '@material-ui/core';
const styles = theme => ({
root: {
flexGrow: 1,
},
container: {
display: 'flex',
},
paper: {
padding: theme.spacing(2),
textAlign: 'center',
color: theme.palette.text.secondary,
flex: '1 0 auto',
margin: theme.spacing(1),
},
});
function GridIntegration(props) {
const { classes } = props;
return (
<div className={classes.root}>
<div className={classes.container}>
<Grid container spacing={3}>
<Grid item xs hidden={{ xsUp: true }}>
<Paper className={classes.paper}>xsUp</Paper>
</Grid>
<Grid item xs hidden={{ smUp: true }}>
<Paper className={classes.paper}>smUp</Paper>
</Grid>
<Grid item xs hidden={{ mdUp: true }}>
<Paper className={classes.paper}>mdUp</Paper>
</Grid>
<Grid item xs hidden={{ lgUp: true }}>
<Paper className={classes.paper}>lgUp</Paper>
</Grid>
<Grid item xs hidden={{ xlUp: true }}>
<Paper className={classes.paper}>xlUp</Paper>
</Grid>
</Grid>
</div>
<Typography variant="caption" align="center">
Current width:
{props.width}
</Typography>
</div>
);
}
GridIntegration.propTypes = {
classes: PropTypes.object.isRequired,
width: PropTypes.string.isRequired,
};
export default compose(withStyles(styles), withWidth())(GridIntegration);
|