Skip to content

Commit 223af91

Browse files
committed
fix: confirmation drawer context tag
1 parent 2e88ba9 commit 223af91

File tree

2 files changed

+9
-33
lines changed

2 files changed

+9
-33
lines changed

src/status_im/common/confirmation_drawer/style.cljs

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,4 @@
1-
(ns status-im.common.confirmation-drawer.style
2-
(:require
3-
[quo.foundations.colors :as colors]))
4-
5-
(defn context-container
6-
[theme]
7-
{:flex-direction :row
8-
:background-color (colors/theme-colors colors/neutral-10 colors/neutral-80 theme)
9-
:border-radius 20
10-
:align-items :center
11-
:align-self :flex-start
12-
:padding 2
13-
:margin-top 4
14-
:margin-bottom 16})
1+
(ns status-im.common.confirmation-drawer.style)
152

163
(def buttons-container
174
{:flex-direction :row

src/status_im/common/confirmation_drawer/view.cljs

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,6 @@
99
[utils.i18n :as i18n]
1010
[utils.re-frame :as rf]))
1111

12-
(defn avatar
13-
[group-chat color display-name photo-path]
14-
(if group-chat
15-
[quo/group-avatar
16-
{:customization-color color
17-
:size :size-20}]
18-
[quo/user-avatar
19-
{:full-name display-name
20-
:profile-picture photo-path
21-
:size :xxs
22-
:status-indicator? false}]))
23-
2412
(defn extra-action-view
2513
[extra-action extra-text extra-action-selected?]
2614
(when extra-action
@@ -38,7 +26,6 @@
3826
(let [{:keys [group-chat chat-id public-key color chat-type
3927
profile-picture name]} context
4028
id (or chat-id public-key)
41-
theme (quo.context/use-theme)
4229
[primary-name _] (when-not (or group-chat
4330
(= chat-type constants/public-chat-type))
4431
(rf/sub [:contacts/contact-two-names-by-identity id]))
@@ -56,12 +43,14 @@
5643
[quo/text
5744
{:weight :semi-bold
5845
:size :heading-2} title]
59-
[rn/view {:style (style/context-container theme)}
60-
[avatar group-chat color display-name photo-path]
61-
[quo/text
62-
{:weight :medium
63-
:size :paragraph-2
64-
:style {:margin-left 4}} display-name]]
46+
[quo/context-tag
47+
{:type (if group-chat :group :default)
48+
:profile-picture photo-path
49+
:full-name display-name
50+
:group-name display-name
51+
:customization-color color
52+
:container-style {:margin-bottom 12 :margin-top 4}
53+
:size 24}]
6554
[quo/text description]
6655
[extra-action-view extra-action extra-text extra-action-selected?]
6756
[rn/view {:style style/buttons-container}

0 commit comments

Comments
 (0)