Skip to content

Commit

Permalink
fix(style): :resize-method is not avaliable on ios
Browse files Browse the repository at this point in the history
  • Loading branch information
yqrashawn committed Feb 20, 2024
1 parent 424bbc3 commit da7e0b0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
11 changes: 6 additions & 5 deletions src/status_im/contexts/onboarding/common/background/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@
(defn background-image
[content-width]
[rn/image
{:resize-mode :stretch
:resize-method :scale
:style {:margin-top 32
:width content-width}
:source (resources/get-image :onboarding-illustration)}])
(cond-> {:resize-mode :stretch
:style {:margin-top 32
:width content-width}
:source (resources/get-image :onboarding-illustration)}
platform/android?
(assoc :resize-method :scale))])

(defonce progress (atom nil))
(defonce paused? (atom nil))
Expand Down
15 changes: 9 additions & 6 deletions src/status_im/contexts/onboarding/welcome/style.cljs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
(ns status-im.contexts.onboarding.welcome.style)
(ns status-im.contexts.onboarding.welcome.style
(:require
[react-native.platform :as platform]))

(def default-margin 20)

Expand All @@ -9,11 +11,12 @@

(defn page-illustration
[width]
{:resize-mode :stretch
:resize-method :scale
:width width
:margin-top 12
:margin-bottom 4})
(cond-> {:resize-mode :stretch
:width width
:margin-top 12
:margin-bottom 4}
platform/android?
(assoc :resize-method :scale)))

(defn buttons
[insets]
Expand Down

0 comments on commit da7e0b0

Please sign in to comment.