From 1bc23ed2ac6015690345f2d8dbe14d698073dc2c Mon Sep 17 00:00:00 2001 From: Miguel Ángel Moreno Date: Sun, 18 Feb 2024 17:13:07 +0100 Subject: feat(frontend): add transparency option to focus overlay component --- src/frontend/tubo/components/layout.cljs | 10 +++++----- 1 file 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] -- cgit v1.2.3