-
Notifications
You must be signed in to change notification settings - Fork 984
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
25 additions
and
62 deletions.
There are no files selected for viewing
31 changes: 10 additions & 21 deletions
31
src/status_im2/common/floating_button_page/floating_container/style.cljs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,16 @@ | ||
(ns status-im2.common.floating-button-page.floating-container.style | ||
(:require [react-native.reanimated :as reanimated] | ||
[react-native.safe-area :as safe-area])) | ||
(:require [react-native.safe-area :as safe-area])) | ||
|
||
(defn get-margin-bottom | ||
[{:keys [blur? keyboard-will-show?]}] | ||
(if (or blur? keyboard-will-show?) | ||
0 | ||
(safe-area/get-bottom))) | ||
|
||
(defn animate-margin-bottom | ||
[margin-bottom-shared-value] | ||
(reanimated/apply-animations-to-style | ||
{:margin-bottom margin-bottom-shared-value} | ||
{:margin-top :auto})) | ||
|
||
(defn content-container [blur?] | ||
(if blur? | ||
{:overflow :hidden} | ||
{:overflow :hidden | ||
:padding-vertical 12 | ||
:padding-horizontal 20})) | ||
(defn content-container [blur? keyboard-shown?] | ||
(let [margin-bottom (if keyboard-shown? 0 (safe-area/get-bottom))] | ||
(cond-> {:margin-top :auto | ||
:overflow :hidden | ||
:margin-bottom margin-bottom | ||
:padding-vertical 12 | ||
:padding-horizontal 20} | ||
blur? (dissoc :padding-vertical :padding-horizontal)))) | ||
|
||
(def blur-inner-container | ||
{:background-color :transparent | ||
{:background-color :transparent ; required, otherwise blur-view will shrink | ||
:padding-vertical 12 | ||
:padding-horizontal 20}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters