diff options
author | Miguel Ángel Moreno <mail@migalmoreno.com> | 2024-02-18 17:13:07 +0100 |
---|---|---|
committer | Miguel Ángel Moreno <mail@migalmoreno.com> | 2024-02-18 17:13:07 +0100 |
commit | 1bc23ed2ac6015690345f2d8dbe14d698073dc2c (patch) | |
tree | b66175031f95b46991a2687188a89375bac668d2 /src/frontend | |
parent | 5dd39fa13e217096273f0d5e12c2957ac65e8f2e (diff) |
feat(frontend): add transparency option to focus overlay component
Diffstat (limited to 'src/frontend')
-rw-r--r-- | src/frontend/tubo/components/layout.cljs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/frontend/tubo/components/layout.cljs b/src/frontend/tubo/components/layout.cljs index e597f45..9d387f6 100644 --- a/src/frontend/tubo/components/layout.cljs +++ b/src/frontend/tubo/components/layout.cljs @@ -16,12 +16,12 @@ {:class (apply str (if (> (count styles) 1) (interpose " " styles) styles)) :style {:color service-color}}]]) -(defn focus-overlay [on-click-cb active?] - [:div.w-full.fixed.min-h-screen.right-0.top-0.transition-all.delay-75.ease-in-out - {:class "bg-black/50" +(defn focus-overlay [on-click active? transparent?] + [:div.w-full.fixed.min-h-screen.right-0.top-0.transition-all.delay-75.ease-in-out.z-20 + {:class (when-not transparent? "bg-black") :style {:visibility (when-not active? "hidden") - :opacity (if active? "1" "0")} - :on-click on-click-cb}]) + :opacity (if active? "0.5" "0")} + :on-click on-click}]) (defn content-container [& children] |