Closed tw1t611 closed 5 years ago
@tw1t611 Take a look at the example section in the README
I did, what did I miss? I found the theme option in v3, is it still available in v4? Does it use the mui defaults as a base?
The theme option is no longer available in v4. You can use a local plugin (see gatsby-plugin-top-layout) or you can use gatsby-theme-material-ui
Thank you very much! gatsby-theme-material-ui is exactly what I was looking for. Don't know, why I had not found it before.
Hi,
I recently encountered a problem on using Material UI's ThemeProvider with Gatsby. Since there is no root component, it's not possible to wrap the whole App with the ThemeProvider. Therefor I do wrap the layout component, which gets imported into the pages. In consequence I need to implement a workaround for all pages, to access the theme.
ThemeProvider in Layout:
Page workaround:
Is there a better way to use material ui ThemeProvider with gatsby? Would it be possible to provide a injectIntoPages option in this plugin?