mirror of
https://github.com/logseq/logseq.git
synced 2026-04-30 08:56:29 +00:00
style: fix notification text theme issue & ui details
This commit is contained in:
@@ -3,9 +3,14 @@
|
||||
|
||||
(rum/defc container
|
||||
[{:keys [theme on-click] :as props} child]
|
||||
(rum/use-effect! #(-> js/document.documentElement
|
||||
(.setAttribute "data-theme" (if (= theme "white") "light" theme)))
|
||||
[theme])
|
||||
rum/use-effect! (let [doc js/document.documentElement
|
||||
cls (.-classList doc)]
|
||||
(.setAttribute doc "data-theme" (if (= theme "white") "light" theme))
|
||||
(if (= theme "dark") ;; for tailwind dark mode
|
||||
(.add cls "dark")
|
||||
(.remove cls "dark")))
|
||||
|
||||
[theme]
|
||||
[:div
|
||||
{:class (str theme "-theme")
|
||||
:on-click on-click}
|
||||
|
||||
Reference in New Issue
Block a user