Skip to content

Commit bdedccd

Browse files
authored
wallet overview: design review fixes (status-im#17046)
1 parent cace2a3 commit bdedccd

File tree

2 files changed

+22
-12
lines changed

2 files changed

+22
-12
lines changed

src/quo2/components/wallet/wallet_overview/style.cljs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
{:flex-direction :row
1313
:justify-content :space-between})
1414

15+
(def container-info-bottom
16+
{:flex-direction :row
17+
:padding-top 4})
18+
1519
(def network-dropdown
1620
{:border-color colors/neutral-50
1721
:border-width 1
@@ -20,8 +24,10 @@
2024
:height 32})
2125

2226
(defn color-metrics
23-
[metrics]
24-
(if (= metrics :positive) colors/success-50 colors/danger-50))
27+
[metrics theme]
28+
(if (= metrics :positive)
29+
(colors/theme-colors colors/success-50 colors/success-60 theme)
30+
(colors/theme-colors colors/danger-50 colors/danger-60 theme)))
2531

2632
(defn color-text-heading
2733
[theme]
@@ -40,8 +46,8 @@
4046
{:color (color-text-paragraph theme)})
4147

4248
(defn dot-separator
43-
[metrics]
44-
{:background-color (color-metrics metrics)
49+
[metrics theme]
50+
{:background-color (color-metrics metrics theme)
4551
:margin-horizontal 4
4652
:width 2
4753
:height 2})

src/quo2/components/wallet/wallet_overview/view.cljs

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,38 +42,38 @@
4242
[network-dropdown-temporary]])
4343

4444
(defn- view-metrics
45-
[metrics currency-change percentage-change]
45+
[{:keys [metrics currency-change percentage-change theme]}]
4646
[rn/view
4747
{:style {:flex-direction :row
4848
:align-items :center}}
4949
[text/text
5050
{:weight :medium
5151
:size :paragraph-2
52-
:style {:color (style/color-metrics metrics)}}
52+
:style {:color (style/color-metrics metrics theme)}}
5353
percentage-change]
5454
[rn/view
55-
{:style (style/dot-separator metrics)}]
55+
{:style (style/dot-separator metrics theme)}]
5656
[text/text
5757
{:weight :medium
5858
:size :paragraph-2
59-
:style {:color (style/color-metrics metrics)
59+
:style {:color (style/color-metrics metrics theme)
6060
:margin-right 4}}
6161
currency-change]
6262
[icons/icon
6363
(if (= metrics :positive) :i/positive :i/negative)
64-
{:color (style/color-metrics metrics)
64+
{:color (style/color-metrics metrics theme)
6565
:size 16}]])
6666

6767
(defn- view-info-bottom
6868
[{:keys [state time-frame metrics date begin-date end-date
6969
currency-change percentage-change theme]}]
70-
[rn/view {:flex-direction :row}
70+
[rn/view {:style style/container-info-bottom}
7171
(when (= state :loading)
7272
[rn/view
7373
{:style {:flex-direction :row
7474
:align-items :center}}
7575
(loading-bars [{:width 32 :height 10 :margin 8}
76-
{:width 32 :height 10 :margin 4}
76+
{:width 32 :height 10 :margin 2}
7777
{:width 62 :height 10 :margin 4}
7878
{:width 10 :height 10 :margin 0}]
7979
theme)])
@@ -107,7 +107,11 @@
107107
:margin-right 8}}
108108
(time-frame time-frames)]
109109
(when (and (= state :default) (not= metrics :none))
110-
[view-metrics metrics currency-change percentage-change])])])
110+
[view-metrics
111+
{:metrics metrics
112+
:currency-change currency-change
113+
:percentage-change percentage-change
114+
:theme theme}])])])
111115

112116
(defn- view-internal
113117
[props]

0 commit comments

Comments
 (0)