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 :background-color colors/blue :align-items :center
:justify-content :center} :justify-content :center}
[react/text {:style {:color colors/white :font-size 12}} "1"]] [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)}]]) :style (styles/photo 40)}]])
;;Title ;;Title
(when 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) [react/text {:style (merge (styles/title small? subtitle)
(when (= theme :action) st/action-button-label) (when (= theme :action) st/action-button-label)
(when (= theme :action-red) st/action-button-label-red)) (when (= theme :action-red) st/action-button-label-red))
@ -52,7 +52,6 @@
(if (vector? content) (if (vector? content)
content content
[content])) [content]))
[react/view {:flex 1}]
;;Accessories ;;Accessories
(for [accessory accessories] (for [accessory accessories]
(when-not (nil? accessory) (when-not (nil? accessory)