From e154ffe178f56dcb72f46b8807b3d8f87f9e37f4 Mon Sep 17 00:00:00 2001 From: Omar Basem Date: Tue, 9 May 2023 13:11:37 +0400 Subject: [PATCH] fix shadow --- src/status_im2/contexts/chat/composer/style.cljs | 4 ++-- src/status_im2/contexts/chat/composer/sub_view.cljs | 8 ++++---- src/status_im2/contexts/chat/composer/view.cljs | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/status_im2/contexts/chat/composer/style.cljs b/src/status_im2/contexts/chat/composer/style.cljs index e6760f7de7..6211de0ae5 100644 --- a/src/status_im2/contexts/chat/composer/style.cljs +++ b/src/status_im2/contexts/chat/composer/style.cljs @@ -85,11 +85,11 @@ :z-index 1})) (defn blur-container - [height] + [height focused?] (reanimated/apply-animations-to-style {:height height} {:position :absolute - :elevation 10 + :elevation (if-not @focused? 10 0) :left 0 :right 0 :bottom 0 diff --git a/src/status_im2/contexts/chat/composer/sub_view.cljs b/src/status_im2/contexts/chat/composer/sub_view.cljs index 783829edb0..bf656f5bde 100644 --- a/src/status_im2/contexts/chat/composer/sub_view.cljs +++ b/src/status_im2/contexts/chat/composer/sub_view.cljs @@ -11,9 +11,9 @@ [rn/view {:style (style/bar)}]]) (defn f-blur-view - [layout-height] - [reanimated/view {:style (style/blur-container layout-height)} + [layout-height focused?] + [reanimated/view {:style (style/blur-container layout-height focused?)} [blur/view (style/blur-view)]]) (defn blur-view - [layout-height] - [:f> f-blur-view layout-height]) + [layout-height focused?] + [:f> f-blur-view layout-height focused?]) diff --git a/src/status_im2/contexts/chat/composer/view.cljs b/src/status_im2/contexts/chat/composer/view.cljs index 73e345e984..cdd5545a99 100644 --- a/src/status_im2/contexts/chat/composer/view.cljs +++ b/src/status_im2/contexts/chat/composer/view.cljs @@ -140,5 +140,5 @@ state (utils/init-state)] [rn/view [reanimated/view {:style (style/background opacity background-y window-height)}] - [sub-view/blur-view blur-height] + [sub-view/blur-view blur-height (:focused? state)] [:f> sheet-component extra-params props state]]))