New icons (icons2) not working in token-tag component #14277 (#14280)

This commit is contained in:
flexsurfer 2022-11-01 14:58:33 +01:00 committed by GitHub
parent ab1dd7e794
commit 7b739dff45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 14 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 706 B

After

Width:  |  Height:  |  Size: 246 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 972 B

After

Width:  |  Height:  |  Size: 286 B

View File

@ -3,7 +3,7 @@
[quo.react-native :as rn] [quo.react-native :as rn]
[quo.theme :as theme] [quo.theme :as theme]
[quo2.components.markdown.text :as text] [quo2.components.markdown.text :as text]
[status-im.ui.components.icons.icons :as icons])) [quo2.components.icon :as icons]))
(def themes {:light {:background-color colors/neutral-20} (def themes {:light {:background-color colors/neutral-20}
:dark {:background-color colors/neutral-80}}) :dark {:background-color colors/neutral-80}})
@ -76,23 +76,19 @@
:or :or
{size :small border-color (colors/custom-color-by-theme :purple 50 60)}}] {size :small border-color (colors/custom-color-by-theme :purple 50 60)}}]
[tag {:size size [tag {:size size
:token-img-src token-img-src :token-img-src token-img-src
:border-color (when is-required border-color) :border-color (when is-required border-color)
:overlay :overlay
(when (or is-required is-purchasable) (when (or is-required is-purchasable)
[rn/view [rn/view
{:style (merge icon-container-styles {:style (merge icon-container-styles
{:width 15.5 {:background-color border-color
:height 15.5 :border-color (if (= (theme/get-theme) :dark) colors/neutral-100 colors/white)
:background-color border-color :border-width 1
:border-color (if (= (theme/get-theme) :dark) colors/neutral-100 colors/white) :right (get-value-from-size size -3.75 -5.75)
:border-width 1 :bottom (get-value-from-size size (- 32 7.75 4) (- 24 7.75 2))})}
:right (get-value-from-size size -3.75 -5.75) [icons/icon (if is-required :main-icons2/hold :main-icons2/add)
:bottom (get-value-from-size size (- 32 7.75 4) (- 24 7.75 2)) ; (- height (icon-height/2) spacing)
})}
[icons/icon (if is-required :main-icons2/required-checkmark12 :main-icons2/purchasable12)
{:no-color true {:no-color true
:width 13.5 :size 12}]])}
:height 13.5}]])}
(str value " " token)])) (str value " " token)]))