ui
ui copied to clipboard
Theme doesn't work in dialogs when i added darkMode: "class" in tailwind.config.js
Theme worked great when this code darkMode: "class" wasn't in tailwind.config.js but after adding it dialogs always appear in light mode.
Hi @AmeerMuaviya, when darkMode is set to class the dark theme is applied when a component has the dark className applied to it. You can enable global dark mode by adding this class to the <html> tag.
If darkMode is set to media the color scheme is applied based on the system configuration.
Hi @AmeerMuaviya, when
darkModeis set toclassthe dark theme is applied when a component has thedarkclassName applied to it. You can enable global dark mode by adding this class to the<html>tag. IfdarkModeis set tomediathe color scheme is applied based on the system configuration.
Thanks for clarification. I noticed that modals & tosts appear in the root of the dom & I had applied class dark in parent div
<div className="dark">{children}</div>
I can also attest that dark mode doesn't work in dialog even when dark class is applied to html. Everything else works but most elements in dialog doesn't change from light to dark.
having it as string works (darkMode: "class") for me, but Array<string> is not working.
This issue has been automatically closed because it received no activity for a while. If you think it was closed by accident, please leave a comment. Thank you.