emoji added to settings item
This commit is contained in:
parent
d3af4de4bc
commit
dbe04ce2a4
|
@ -1,5 +1,6 @@
|
||||||
(ns quo.components.settings.settings-item.view
|
(ns quo.components.settings.settings-item.view
|
||||||
(:require
|
(:require
|
||||||
|
[clojure.string :as string]
|
||||||
[quo.components.avatars.icon-avatar :as icon-avatar]
|
[quo.components.avatars.icon-avatar :as icon-avatar]
|
||||||
[quo.components.avatars.user-avatar.view :as user-avatar]
|
[quo.components.avatars.user-avatar.view :as user-avatar]
|
||||||
[quo.components.buttons.button.view :as button]
|
[quo.components.buttons.button.view :as button]
|
||||||
|
@ -51,6 +52,11 @@
|
||||||
:status [status-description props]
|
:status [status-description props]
|
||||||
nil))
|
nil))
|
||||||
|
|
||||||
|
(defn emoji-component
|
||||||
|
[image-props]
|
||||||
|
[rn/text
|
||||||
|
(when image-props (string/trim image-props))])
|
||||||
|
|
||||||
(defn image-component
|
(defn image-component
|
||||||
[{:keys [image image-props description tag blur?]}]
|
[{:keys [image image-props description tag blur?]}]
|
||||||
(let [theme (quo.theme/use-theme)]
|
(let [theme (quo.theme/use-theme)]
|
||||||
|
@ -61,6 +67,7 @@
|
||||||
:avatar [user-avatar/user-avatar image-props]
|
:avatar [user-avatar/user-avatar image-props]
|
||||||
:icon-avatar [icon-avatar/icon-avatar image-props]
|
:icon-avatar [icon-avatar/icon-avatar image-props]
|
||||||
:token [token/view image-props]
|
:token [token/view image-props]
|
||||||
|
:emoji [emoji-component image-props]
|
||||||
nil)]))
|
nil)]))
|
||||||
|
|
||||||
(defn tag-component
|
(defn tag-component
|
||||||
|
|
|
@ -37,7 +37,9 @@
|
||||||
{:key :avatar
|
{:key :avatar
|
||||||
:value :avatar}
|
:value :avatar}
|
||||||
{:key :icon-avatar
|
{:key :icon-avatar
|
||||||
:value :icon-avatar}]}
|
:value :icon-avatar}
|
||||||
|
{:key :emoji
|
||||||
|
:value :emoji}]}
|
||||||
{:key :description
|
{:key :description
|
||||||
:type :select
|
:type :select
|
||||||
:options [{:key nil
|
:options [{:key nil
|
||||||
|
@ -77,6 +79,7 @@
|
||||||
:icon-avatar {:size :medium
|
:icon-avatar {:size :medium
|
||||||
:icon :i/placeholder
|
:icon :i/placeholder
|
||||||
:color :blue}
|
:color :blue}
|
||||||
|
:emoji "🍿"
|
||||||
nil)
|
nil)
|
||||||
:description-props (case (:description data)
|
:description-props (case (:description data)
|
||||||
:text {:text "This is a description"}
|
:text {:text "This is a description"}
|
||||||
|
|
|
@ -59,9 +59,9 @@
|
||||||
[quo/category
|
[quo/category
|
||||||
{:list-type :settings
|
{:list-type :settings
|
||||||
:data [{:title "Normal ~60s"
|
:data [{:title "Normal ~60s"
|
||||||
:image-props :i/placeholder
|
:image-props "🍿"
|
||||||
:description-props {:text "€1.45"}
|
:description-props {:text "€1.45"}
|
||||||
:image :icon
|
:image :emoji
|
||||||
:description :text
|
:description :text
|
||||||
:action :selector
|
:action :selector
|
||||||
:action-props {:type :radio
|
:action-props {:type :radio
|
||||||
|
@ -70,9 +70,9 @@
|
||||||
:label :text
|
:label :text
|
||||||
:preview-size :size-32}
|
:preview-size :size-32}
|
||||||
{:title "Fast ~40s"
|
{:title "Fast ~40s"
|
||||||
:image-props :i/placeholder
|
:image-props "🚗"
|
||||||
:description-props {:text "€1.65"}
|
:description-props {:text "€1.65"}
|
||||||
:image :icon
|
:image :emoji
|
||||||
:description :text
|
:description :text
|
||||||
:action :selector
|
:action :selector
|
||||||
:action-props {:type :radio
|
:action-props {:type :radio
|
||||||
|
@ -81,9 +81,9 @@
|
||||||
:label :text
|
:label :text
|
||||||
:preview-size :size-32}
|
:preview-size :size-32}
|
||||||
{:title "Urgent ~15s"
|
{:title "Urgent ~15s"
|
||||||
:image-props :i/placeholder
|
:image-props "🚀"
|
||||||
:description-props {:text "€1.85"}
|
:description-props {:text "€1.85"}
|
||||||
:image :icon
|
:image :emoji
|
||||||
:description :text
|
:description :text
|
||||||
:action :selector
|
:action :selector
|
||||||
:action-props {:type :radio
|
:action-props {:type :radio
|
||||||
|
|
Loading…
Reference in New Issue