diff --git a/docs/src/pages/demos/paper/PaperSheet.js b/docs/src/pages/demos/paper/PaperSheet.js
index 4cb643fa2af6c9..0363351a92a215 100644
--- a/docs/src/pages/demos/paper/PaperSheet.js
+++ b/docs/src/pages/demos/paper/PaperSheet.js
@@ -1,17 +1,16 @@
import React from 'react';
-import PropTypes from 'prop-types';
-import { withStyles } from '@material-ui/core/styles';
+import { makeStyles } from '@material-ui/core/styles';
import Paper from '@material-ui/core/Paper';
import Typography from '@material-ui/core/Typography';
-const styles = theme => ({
+const useStyles = makeStyles(theme => ({
root: {
padding: theme.spacing(3, 2),
},
-});
+}));
-function PaperSheet(props) {
- const { classes } = props;
+function PaperSheet() {
+ const classes = useStyles();
return (
@@ -27,8 +26,4 @@ function PaperSheet(props) {
);
}
-PaperSheet.propTypes = {
- classes: PropTypes.object.isRequired,
-};
-
-export default withStyles(styles)(PaperSheet);
+export default PaperSheet;
diff --git a/docs/src/pages/demos/paper/PaperSheet.tsx b/docs/src/pages/demos/paper/PaperSheet.tsx
index 6941388977f12a..d03535a6bfe1ed 100644
--- a/docs/src/pages/demos/paper/PaperSheet.tsx
+++ b/docs/src/pages/demos/paper/PaperSheet.tsx
@@ -1,18 +1,18 @@
import React from 'react';
-import PropTypes from 'prop-types';
-import { withStyles, Theme, createStyles, WithStyles } from '@material-ui/core/styles';
+import { Theme, createStyles, makeStyles } from '@material-ui/core/styles';
import Paper from '@material-ui/core/Paper';
import Typography from '@material-ui/core/Typography';
-const styles = (theme: Theme) =>
+const useStyles = makeStyles((theme: Theme) =>
createStyles({
root: {
padding: theme.spacing(3, 2),
},
- });
+ }),
+);
-function PaperSheet(props: WithStyles
) {
- const { classes } = props;
+function PaperSheet() {
+ const classes = useStyles();
return (
@@ -28,8 +28,4 @@ function PaperSheet(props: WithStyles) {
);
}
-PaperSheet.propTypes = {
- classes: PropTypes.object.isRequired,
-} as any;
-
-export default withStyles(styles)(PaperSheet);
+export default PaperSheet;