Issue
I want to override the MuiBox-root style for the whole application.According to the official documentation I need to identify the class:
And among other things I can override it:
But if I proceed this way, it just removes the styling. What am I doing wrong here?
Solution
This will do:
import { withStyles } from "@material-ui/core/styles";
const styles = {
root: {
padding: "10px"
}
};
function App({ classes }) {
return <yourelement className={classes.root}>xyz...<yourelement/>;
}
export default withStyles(styles)(App);
Answered By - nikhil sugandh


0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.