Skip to content

Commit

Permalink
yarn docs:typescript:formatted
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Oct 7, 2019
1 parent 5dd235e commit 0b77827
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions docs/src/pages/customization/breakpoints/MediaQuery.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import React from 'react';
import PropTypes from 'prop-types';
import { withStyles } from '@material-ui/core/styles';
import { makeStyles } from '@material-ui/core/styles';
import Typography from '@material-ui/core/Typography';
import { green } from '@material-ui/core/colors';

const styles = theme => ({
const useStyles = makeStyles(theme => ({
root: {
padding: theme.spacing(1),
[theme.breakpoints.down('sm')]: {
Expand All @@ -17,11 +16,10 @@ const styles = theme => ({
backgroundColor: green[500],
},
},
});

function MediaQuery(props) {
const { classes } = props;
}));

export default function MediaQuery() {
const classes = useStyles();
return (
<div className={classes.root}>
<Typography variant="subtitle1">{'down(sm): red'}</Typography>
Expand All @@ -30,9 +28,3 @@ function MediaQuery(props) {
</div>
);
}

MediaQuery.propTypes = {
classes: PropTypes.object.isRequired,
};

export default withStyles(styles)(MediaQuery);

0 comments on commit 0b77827

Please sign in to comment.