🐛 Fix unexpected text wrapping on exporting.

This commit is contained in:
Andrey Antukh 2021-08-31 12:08:44 +02:00 committed by Alonso Torres
parent df8269bc7f
commit e9fdd74a99

View file

@ -16,8 +16,9 @@
(defn generate-root-styles (defn generate-root-styles
[shape node] [shape node]
(let [valign (:vertical-align node "top") (let [valign (:vertical-align node "top")
width (some-> (:width shape) (+ 1))
base #js {:height (or (:height shape) "100%") base #js {:height (or (:height shape) "100%")
:width (or (:width shape) "100%")}] :width (or width "100%")}]
(cond-> base (cond-> base
(= valign "top") (obj/set! "justifyContent" "flex-start") (= valign "top") (obj/set! "justifyContent" "flex-start")
(= valign "center") (obj/set! "justifyContent" "center") (= valign "center") (obj/set! "justifyContent" "center")