Compare commits

...
3 changed files with 11 additions and 6 deletions
@@ -1,6 +1,7 @@
(ns quo.components.settings.data-item.component-spec
(:require
[quo.core :as quo]
[quo.foundations.resources :as quo.resources]
[test-helpers.component :as h]))
(h/describe
@@ -161,7 +162,8 @@
:subtitle "Description"
:icon :i/placeholder
:emoji "🎮"
:customization-color :yellow}])
:customization-color :yellow
:network-image (quo.resources/get-network :ethereum)}])
(h/is-truthy (h/query-by-label-text :description-image)))
(h/test "description emoji is visible when description is account"
@@ -7,7 +7,6 @@
[quo.components.markdown.text :as text]
[quo.components.settings.data-item.style :as style]
[quo.foundations.colors :as colors]
[quo.foundations.resources :as quo.resources]
[quo.theme :as quo.theme]
[react-native.core :as rn]
[utils.i18n :as i18n]))
@@ -17,7 +16,8 @@
[rn/view {:style (style/loading-container size blur? theme)}])
(defn- left-subtitle
[{:keys [theme size description icon icon-color blur? subtitle customization-color emoji]}]
[{:keys [theme size description icon icon-color blur? subtitle customization-color emoji
network-image]}]
[rn/view {:style style/subtitle-container}
(when (not= :small size)
[rn/view {:style (style/subtitle-icon-container description)}
@@ -33,7 +33,7 @@
:type :default}]
:network [rn/image
{:accessibility-label :description-image
:source (quo.resources/tokens :eth)
:source network-image
:style style/image}]
nil)])
[text/text
@@ -60,7 +60,7 @@
(defn- left-side
"The description can either be given as a string `description` or a component `custom-subtitle`"
[{:keys [theme title status size blur? description custom-subtitle icon subtitle label icon-color
customization-color
customization-color network-image
emoji]
:as props}]
[rn/view {:style style/left-side}
@@ -85,7 +85,8 @@
:blur? blur?
:subtitle subtitle
:customization-color customization-color
:emoji emoji}]))])
:emoji emoji
:network-image network-image}]))])
(defn- right-side
[{:keys [label icon-right? right-icon icon-color communities-list]}]
@@ -1,6 +1,7 @@
(ns status-im2.contexts.quo-preview.settings.data-item
(:require
[quo.core :as quo]
[quo.foundations.resources :as quo.resources]
[reagent.core :as reagent]
[status-im2.common.resources :as resources]
[status-im2.contexts.quo-preview.preview :as preview]))
@@ -50,6 +51,7 @@
:right-icon :i/chevron-right
:emoji "🎮"
:customization-color :yellow
:network-image (quo.resources/get-network :ethereum)
:communities-list communities-list})]
(fn []
[preview/preview-container