Skip to content
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

[docs] Add a note about minimal required version for theme merging to the guides #36973

Merged
merged 4 commits into from
Apr 27, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ Additionally, keep these in mind when using them together:
- Both of them use [MUI System](/system/getting-started/overview/) as their style engine, which uses React context for theming.
- Theme scoping must be done on one of the libraries.

## Making sure you're on the right version of MUI
These changes have been added as recently as April 2023, so be sure you're running MUI v5.12.0 or higher.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Making sure you're on the right version of MUI
These changes have been added as recently as April 2023, so be sure you're running MUI v5.12.0 or higher.
## Making sure you're on the right version of Material UI
These changes have been added as recently as April 2023, so be sure you're running Material UI v5.12.0 or higher.


## Set up the providers

Render Material UI's `CssVarsProvider` inside Joy UI's provider and use `THEME_ID` to separate the themes from each other.
Expand Down
2 changes: 2 additions & 0 deletions docs/data/material/guides/styled-engine/styled-engine.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ Having more than one styling libraries could introduce unnecessary complexity to

Material UI can coexist with other libraries that depend on emotion or styled-components. To do that, render Material UI's `ThemeProvider` as an inner provider and use the `THEME_ID` to store the theme.

These changes have been added as recently as April 2023, so be sure you're running MUI v5.12.0 or higher.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
These changes have been added as recently as April 2023, so be sure you're running MUI v5.12.0 or higher.
These changes have been added as recently as April 2023, so be sure you're running Material UI v5.12.0 or higher.


```js
import { ThemeProvider, THEME_ID, createTheme } from '@mui/material/styles';
import { AnotherThemeProvider } from 'another-ui-library';
Expand Down