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] Fix classname mismatch on Joy docs #36127

Merged
merged 1 commit into from
Feb 10, 2023

Conversation

siriwatknp
Copy link
Member

@siriwatknp siriwatknp commented Feb 10, 2023

From https://mui-org.slack.com/archives/C042VP80PT5/p1675800808539159

Root cause

The style customization of DemoRootJoy is incorrect. It should follow this guide because the mode on the server and client could be different.

Fix

Our docs have special fn theme.applyDarkStyles() that will ensure the dark styles are applied correctly.

{
- backgroundColor: theme.palette.mode === 'dark' ? <dark> : <light>
+ backgroundColor: <light>,
+ …theme.applyDarkStyles({ backgroundColor: <dark> }),
}

Before

Screen.Recording.2566-02-10.at.11.45.29.mov

After

Screen.Recording.2566-02-10.at.11.46.05.mov

@siriwatknp siriwatknp added the docs Improvements or additions to the documentation label Feb 10, 2023
@mui-bot
Copy link

mui-bot commented Feb 10, 2023

Netlify deploy preview

No updates.

Bundle size report

No bundle size changes

Generated by 🚫 dangerJS against eddccac

@siriwatknp siriwatknp merged commit 2109194 into mui:master Feb 10, 2023
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants