March 2019
Intermediate to advanced
534 pages
14h 52m
English
Let's take a closer look at how your styles fit into a Material-UI theme:
overrides: { MuiButton: { root: { margin: 16 }, contained: { paddingTop: defaultTheme.spacing(2), paddingBottom: defaultTheme.spacing(2) }, containedPrimary: { paddingLeft: defaultTheme.spacing(4), paddingRight: defaultTheme.spacing(4) } }}
The overrides property is an object that allows you to override component-specific properties of the theme. In this case, it's the MuiButton component styles that you want to override. Within MuiButton, you have the same CSS API that is used to target specific aspects of components. This makes moving your styles into the theme straightforward, because there isn't much to change.
One thing that did have to change in ...
Read now
Unlock full access