Switching theme not working on Windows - overriding themes broke the switch between themes #3083
Unanswered
FabienWalle
asked this question in
Q&A
Replies: 1 comment 2 replies
-
I guess you should use your theme names here:
instead of If the issue still exists, please provide a minimal reproduction link. Let me know if you have a question. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi.
I've been trying to fix two problems in my React project for some time now but I'm still not getting anywhere.
I've configured the Light and Business themes. I use ReduxToolKit to change themes. I have a Sun/Moon icon in the header to change and everything works:
tailwind.config.js:
theme.slice.ts:
Switch icon in header.tsx :
on Windows, the theme change doesn't work. I have to change the global Windows theme, like shown in this image :
https://cdn.mos.cms.futurecdn.net/CEkjvLtjQXjgnMZvosd8Jm-650-80.jpg.webp
then the switch works. I'd like to be able to make it work without the user having to change their Windows configuration.
I'd like to override some of the colours in these two themes for those ones:
for light:
for business :
However when I try to configure this overload in tailwind.config.js, like this :
I do see the new colours displayed, but the switch no longer works. The application remains in light. I can see the icon change from sun to moon and its animation.
Thank you in advance !
Beta Was this translation helpful? Give feedback.
All reactions