material ui jss global styles location code example
Example: use theme in class component material ui
import { withStyles } from "@material-ui/core/styles";
const styles = theme => ({
root: {
backgroundColor: "red"
}
});
class ClassComponent extends Component {
state = {
searchNodes: ""
};
render() {
const { classes } = this.props;
return (
Hello!
);
}
}
export default withStyles(styles, { withTheme: true })(ClassComponent);