list-item fix

Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
This commit is contained in:
Andrey Shovkoplyas 2019-08-23 11:08:45 +03:00
parent d4b918b2cf
commit 0210f413ab
No known key found for this signature in database
GPG Key ID: EAAB7C8622D860A4
2 changed files with 20 additions and 3 deletions

View File

@ -125,4 +125,22 @@
:background-color colors/blue :align-items :center
:justify-content :center}
[react/text {:style {:color colors/white :font-size 12}} "1"]]
:chevron]}]]]])
:chevron]}]]]
[react/view {:margin-right 10}
[item "Long title"
[list-item/list-item {:title "loooooooooong looooooong looooooong title"
:subtitle "ENS name"
:icon :main-icons/address
:accessories [:chevron]
:on-press #()}]]
[item "Long subtitle"
[list-item/list-item {:title "alex.stateofus.eth"
:subtitle "loooooooooooong loooooong looooooong subtitle"
:icon :main-icons/address
:accessories [:chevron]
:on-press #()}]]
[item "Long accessories"
[list-item/list-item {:title "From"
:type :small
:accessories ["loooooooooooongloooooonglooo00oooongaccessories"]
:on-press #()}]]]])

View File

@ -34,7 +34,7 @@
:style (styles/photo 40)}]])
;;Title
(when title
[react/view {:style {:margin-left 16 :margin-right 16}}
[react/view {:style {:margin-left 16 :margin-right 16 :flex 1 :min-width 50}}
[react/text {:style (merge (styles/title small? subtitle)
(when (= theme :action) st/action-button-label)
(when (= theme :action-red) st/action-button-label-red))
@ -52,7 +52,6 @@
(if (vector? content)
content
[content]))
[react/view {:flex 1}]
;;Accessories
(for [accessory accessories]
(when-not (nil? accessory)