My HOC :
const withPaper = Component => props => (
<Paper>
<Component {...props} />
</Paper>
);
export default withPaper;
I want to style 'Paper' component using withStyles()
:
const styles = theme => ({
root: {
backgroundColor: 'green'
}
});
const withPaper = ?? => ?? => (
<Paper className={classes.root}>
<Component {...props} />
</Paper>
);
export default withStyles(styles)(withPaper);
How can I inject classes prop this case?
My simple idea Component => ({classes, ...props}) =>
logs error.
TypeError: Cannot call a class as a function