fixed wizard text

Signed-off-by: yenda <eric@status.im>
This commit is contained in:
Andrey Shovkoplyas 2020-05-08 13:32:53 +02:00 committed by yenda
parent a06413b6f7
commit c8b5e39dc1
No known key found for this signature in database
GPG Key ID: 0095623C0069DCE6
2 changed files with 7 additions and 4 deletions

View File

@ -29,9 +29,12 @@
:text-align :center
:margin-bottom 16})
(defn wizard-text [height]
(merge {:color colors/gray
:text-align :center}
(def wizard-text
{:color colors/gray
:text-align :center})
(defn wizard-text-with-height [height]
(merge wizard-text
(when-not (zero? height)
{:height height})))

View File

@ -72,7 +72,7 @@
:style {:width size
:height size}}]])
[react/i18n-text {:style styles/wizard-title :key (:title s)}]
[react/text {:style (styles/wizard-text @text-height)
[react/text {:style (styles/wizard-text-with-height @text-height)
:on-layout
(fn [^js e]
(let [new-height (-> e .-nativeEvent .-layout .-height)]