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 :text-align :center
:margin-bottom 16}) :margin-bottom 16})
(defn wizard-text [height] (def wizard-text
(merge {:color colors/gray {:color colors/gray
:text-align :center} :text-align :center})
(defn wizard-text-with-height [height]
(merge wizard-text
(when-not (zero? height) (when-not (zero? height)
{:height height}))) {:height height})))

View File

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