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

[examples] Add dark mode example for Material UI + Pigment CSS #44480

Merged
merged 8 commits into from
Nov 21, 2024

Conversation

mnajdova
Copy link
Member

@mnajdova mnajdova commented Nov 20, 2024

Fixes #44384

Add mode switcher on the Material UI + Pigment CSS example project. It's a fully end to end functional solution, by using cookie to store the previous setting and local storage to sync between tabs (similar to what the CSSVarsProvider offers).

Here is a preview: https://material-ui-pigment-css-dark-mode-switch.vercel.app/

Screenshot 2024-11-20 at 16 11 47 Screenshot 2024-11-20 at 16 11 59

@mnajdova mnajdova added the examples Relating to /examples label Nov 20, 2024
@mui-bot
Copy link

mui-bot commented Nov 20, 2024

Netlify deploy preview

https://deploy-preview-44480--material-ui.netlify.app/

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against 61d16bd

@mnajdova mnajdova requested a review from siriwatknp November 20, 2024 12:25
@mnajdova mnajdova marked this pull request as ready for review November 20, 2024 12:25
@mnajdova mnajdova requested a review from brijeshb42 November 20, 2024 12:25
Copy link
Contributor

@brijeshb42 brijeshb42 left a comment

Choose a reason for hiding this comment

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

LGTM. Could you share a screen shot of how this looks (if you already have it) ?

@mnajdova
Copy link
Member Author

LGTM. Could you share a screen shot of how this looks (if you already have it) ?

Added in the PR description

Copy link
Member

@siriwatknp siriwatknp left a comment

Choose a reason for hiding this comment

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

I have one comment on the theme creation. The rest looks good to me.

@mnajdova mnajdova merged commit 4bed60a into mui:master Nov 21, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
examples Relating to /examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

With Pigment CSS, it's unclear how to manually switch palette mode (light / dark)
4 participants