Switching between dark and light themes programatically #387
Unanswered
jugglingcats
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, we have a need to switch between the light and dark theme at runtime, based of user light/dark mode selection.
We're using styled-components and I've managed to make it work by copying the vars from
dark.css
and adding them conditionally to the styled div, like so:This seems to work fine for our purposes, just wondering if there is a cleaner way that avoids copying from the flexlayout css?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions