-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Theme example breaks with AppBar usage #20136
Labels
docs
Improvements or additions to the documentation
good first issue
Great for first contributions. Enable to learn the contribution process.
Comments
It looks like the docs here: and the Codesandboxes need to be updated to include |
Yeah the example is not very helpful since it uses /core but wouldn't work with /core components. We should wrap it in |
eps1lon
added
docs
Improvements or additions to the documentation
good first issue
Great for first contributions. Enable to learn the contribution process.
labels
Mar 16, 2020
Definitely, it will be clearer with something like this: diff --git a/docs/src/pages/styles/advanced/advanced.md b/docs/src/pages/styles/advanced/advanced.md
index 53227692a..c192f2c1a 100644
--- a/docs/src/pages/styles/advanced/advanced.md
+++ b/docs/src/pages/styles/advanced/advanced.md
@@ -6,7 +6,7 @@
Add a `ThemeProvider` to the top level of your app to pass a theme down the React component tree. Then, you can access the theme object in style functions.
-> This example creates a new theme. See the [theming section](/customization/theming/) for how to customize the default Material-UI theme.
+> This example creates a minimalist theme object. Head to the [theming section](/customization/theming/) if you intend to use some of the Material-UI's components. You need to provide a richer theme structure using the `createMuiTheme()` method.
```jsx
import { ThemeProvider } from '@material-ui/core/styles'; @matthewoates do you want to submit a pull request? :) |
PR created: |
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
docs
Improvements or additions to the documentation
good first issue
Great for first contributions. Enable to learn the contribution process.
https://codesandbox.io/s/material-demo-qjiv5
This breaks with the suggested theme object:
To fix the
cannot set property type of undefined
error:And to fix that error:
and I'm presented with yet another error. I'd expect the theme manager to merge the theme object correctly so that fields aren't missing.
The text was updated successfully, but these errors were encountered: