Accessing Previous Theme Variables In CreateMuiTheme


Answer :

You'd need to create an instance of the default theme and use it when defining your own:

import { createMuiTheme } from 'material-ui/styles';  const defaultTheme = createMuiTheme();  const theme = createMuiTheme({   typography: {     fontSize: defaultTheme.typography.fontSize + 2   } });  export default theme; 

You can also create your theme and then add on to it after theme is created.

import { createMuiTheme } from 'material-ui/styles';  const theme = createMuiTheme(); theme.typography = {   ...theme.typography,   fontSize: theme.typography.fontSize + 2 }  export default theme; 

Comments

Popular posts from this blog

Are Regular VACUUM ANALYZE Still Recommended Under 9.1?

Can Feynman Diagrams Be Used To Represent Any Perturbation Theory?