As you develop your Material-UI application, you'll start to notice style patterns that repeat themselves. In particular, styles that apply to one type of component, such as buttons, evolve into a theme.
Moving styles to themes
How to do it...
Let's revisit the example from the Scoped component styles section:
import React, { Fragment } from 'react';
import { withStyles } from '@material-ui/core/styles';
import Button from '@material-ui/core/Button';
const styles = theme => ({
root: {
margin: theme.spacing(2)
},
contained: {
paddingTop: theme.spacing(2),
paddingBottom: theme.spacing(2)
},
containedPrimary: {
paddingLeft: theme.spacing(4),
paddingRight: theme.spacing...