mui / material-ui

Material UI: Comprehensive React component library that implements Google's Material Design. Free forever.
https://mui.com/material-ui/
MIT License
94.02k stars 32.3k forks source link

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

Closed mnajdova closed 21 hours ago

mnajdova commented 1 day ago

Fixes https://github.com/mui/material-ui/issues/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
mui-bot commented 1 day ago

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 :no_entry_sign: dangerJS against 61d16bd77fe87448384330deca231dc659b9c39c

mnajdova commented 1 day ago

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

Added in the PR description