🐛 Fix problem with small with texts

This commit is contained in:
alonso.torres 2022-05-19 14:16:48 +02:00 committed by Andrés Moya
parent d45bb0ace1
commit 93b582c385

View file

@ -21,7 +21,7 @@
:width width :width width
:fontFamily "sourcesanspro" :fontFamily "sourcesanspro"
:display "flex" :display "flex"
:whiteSpace "pre-wrap"}] :whiteSpace "break-spaces"}]
(cond-> base (cond-> base
(= valign "top") (obj/set! "alignItems" "flex-start") (= valign "top") (obj/set! "alignItems" "flex-start")
(= valign "center") (obj/set! "alignItems" "center") (= valign "center") (obj/set! "alignItems" "center")
@ -83,7 +83,9 @@
:lineHeight (or line-height "1.2") :lineHeight (or line-height "1.2")
:color (if show-text? text-color "transparent") :color (if show-text? text-color "transparent")
:caretColor (or text-color "black") :caretColor (or text-color "black")
:overflowWrap "initial"} :overflowWrap "initial"
:lineBreak "auto"
:whiteSpace "break-spaces"}
fills fills
(cond (cond
@ -126,7 +128,4 @@
(obj/set! "fontWeight" font-weight)) (obj/set! "fontWeight" font-weight))
(= grow-type :auto-width) (= grow-type :auto-width)
(obj/set! "whiteSpace" "pre") (obj/set! "whiteSpace" "pre")))))
(not= grow-type :auto-width)
(obj/set! "whiteSpace" "pre-wrap")))))