File tree 1 file changed +17
-12
lines changed
src/quo2/components/notifications
1 file changed +17
-12
lines changed Original file line number Diff line number Diff line change 3
3
[quo2.foundations.typography :as typography]
4
4
[react-native.core :as rn]))
5
5
6
+ (defn- counter-style
7
+ [customization-color overwritten-styles]
8
+ (merge {:width 16
9
+ :height 16
10
+ :position :absolute
11
+ :right 22
12
+ :border-radius 6
13
+ :justify-content :center
14
+ :align-items :center
15
+ :background-color (colors/custom-color-by-theme customization-color 50 60 )}
16
+ overwritten-styles))
17
+
6
18
(defn info-count
7
19
([amount]
8
20
(info-count {} amount))
9
- ([props amount]
21
+ ([{:keys [customization-color style]
22
+ :or {customization-color :blue }
23
+ :as props}
24
+ amount]
10
25
(when (> amount 0 )
11
- [rn/view
12
- (merge props
13
- {:style (merge {:width 16
14
- :height 16
15
- :position :absolute
16
- :right 22
17
- :border-radius 6
18
- :justify-content :center
19
- :align-items :center
20
- :background-color (colors/theme-colors colors/primary-50 colors/primary-60)}
21
- (:style props))})
26
+ [rn/view (merge props {:style (counter-style customization-color style)})
22
27
[rn/text
23
28
{:style (merge typography/font-medium
24
29
typography/label
You can’t perform that action at this time.
0 commit comments