I'm trying to use a custom component, like the code below, but the same is giving error, can anyone give me a light of why the error is happening?
import React from 'react';
import {withStyles, createStyleSheet} from 'material-ui/styles'
import PropTypes from 'prop-types';
import {Drawer} from 'material-ui';
const styleSheet = createStyleSheet({
paper: {
height: 'calc(100% - 64px)',
top: 64
}
})
class CustomDrawer extends React.Component {
render () {
const classes = this.props.classes
return (
<Drawer
classes={{ paper: classes.paper}}
/>
)
}
}
CustomDrawer.propTypes = {
classes: PropTypes.object.isRequired
};
export default withStyles(styleSheet)(CustomDrawer);
This error is happening and I'm not understanding
TypeError: Object (...) is not a function ./src/components/CustomDrawer/CustomDrawer.jsx src / components / CustomDrawer / CustomDrawer.jsx:
3 | import PropTypes from 'prop-types';
4 | import {Drawer} from 'material-ui';
5 |
> 6 | const styleSheet = createStyleSheet({
7 | paper: {
8 | height: 'calc(100% - 64px)',
9 | top: 64