emoji added to settings item

This commit is contained in:
Volodymyr Kozieiev 2024-11-20 16:25:53 +00:00
parent d3af4de4bc
commit dbe04ce2a4
No known key found for this signature in database
GPG Key ID: 82B04968DF4C0535
3 changed files with 17 additions and 7 deletions

View File

@ -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

View File

@ -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"}

View File

@ -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