From dbe04ce2a4a35732d002abb49a09f0e646249d2b Mon Sep 17 00:00:00 2001 From: Volodymyr Kozieiev Date: Wed, 20 Nov 2024 16:25:53 +0000 Subject: [PATCH] emoji added to settings item --- src/quo/components/settings/settings_item/view.cljs | 7 +++++++ .../contexts/preview/quo/settings/settings_item.cljs | 5 ++++- .../wallet/send/transaction_settings/view.cljs | 12 ++++++------ 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/quo/components/settings/settings_item/view.cljs b/src/quo/components/settings/settings_item/view.cljs index 80e1ab483e..70a109a34b 100644 --- a/src/quo/components/settings/settings_item/view.cljs +++ b/src/quo/components/settings/settings_item/view.cljs @@ -1,5 +1,6 @@ (ns quo.components.settings.settings-item.view (:require + [clojure.string :as string] [quo.components.avatars.icon-avatar :as icon-avatar] [quo.components.avatars.user-avatar.view :as user-avatar] [quo.components.buttons.button.view :as button] @@ -51,6 +52,11 @@ :status [status-description props] nil)) +(defn emoji-component + [image-props] + [rn/text + (when image-props (string/trim image-props))]) + (defn image-component [{:keys [image image-props description tag blur?]}] (let [theme (quo.theme/use-theme)] @@ -61,6 +67,7 @@ :avatar [user-avatar/user-avatar image-props] :icon-avatar [icon-avatar/icon-avatar image-props] :token [token/view image-props] + :emoji [emoji-component image-props] nil)])) (defn tag-component diff --git a/src/status_im/contexts/preview/quo/settings/settings_item.cljs b/src/status_im/contexts/preview/quo/settings/settings_item.cljs index 7bf067c88b..9e703e1a3a 100644 --- a/src/status_im/contexts/preview/quo/settings/settings_item.cljs +++ b/src/status_im/contexts/preview/quo/settings/settings_item.cljs @@ -37,7 +37,9 @@ {:key :avatar :value :avatar} {:key :icon-avatar - :value :icon-avatar}]} + :value :icon-avatar} + {:key :emoji + :value :emoji}]} {:key :description :type :select :options [{:key nil @@ -77,6 +79,7 @@ :icon-avatar {:size :medium :icon :i/placeholder :color :blue} + :emoji "🍿" nil) :description-props (case (:description data) :text {:text "This is a description"} diff --git a/src/status_im/contexts/wallet/send/transaction_settings/view.cljs b/src/status_im/contexts/wallet/send/transaction_settings/view.cljs index 0f80c38bc4..3395fa92be 100644 --- a/src/status_im/contexts/wallet/send/transaction_settings/view.cljs +++ b/src/status_im/contexts/wallet/send/transaction_settings/view.cljs @@ -59,9 +59,9 @@ [quo/category {:list-type :settings :data [{:title "Normal ~60s" - :image-props :i/placeholder + :image-props "🍿" :description-props {:text "€1.45"} - :image :icon + :image :emoji :description :text :action :selector :action-props {:type :radio @@ -70,9 +70,9 @@ :label :text :preview-size :size-32} {:title "Fast ~40s" - :image-props :i/placeholder + :image-props "🚗" :description-props {:text "€1.65"} - :image :icon + :image :emoji :description :text :action :selector :action-props {:type :radio @@ -81,9 +81,9 @@ :label :text :preview-size :size-32} {:title "Urgent ~15s" - :image-props :i/placeholder + :image-props "🚀" :description-props {:text "€1.85"} - :image :icon + :image :emoji :description :text :action :selector :action-props {:type :radio