-
Notifications
You must be signed in to change notification settings - Fork 990
/
Copy pathquo.cljs
32 lines (28 loc) · 931 Bytes
/
quo.cljs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
(ns schema.quo
(:require
[quo.foundations.colors :as colors]
[schema.registry :as registry]))
(def ^:private ?profile-picture-fn-params
[:map
[:length :int]
[:full-name :string]
[:font-size :int]
[:indicator-size {:optional true} [:maybe :int]]
[:indicator-color {:optional true} [:maybe :string]]
[:indicator-center-to-edge {:optional true} [:maybe :int]]
[:override-theme :schema.common/theme]
[:background-color :string]
[:color :string]
[:size :int]
[:ring? :boolean]
[:ring-width :int]])
(def ^:private ?profile-picture-source
[:or
:schema.common/image-source
[:map
[:fn [:=> [:cat ?profile-picture-fn-params] :string]]]])
(def ^:private ?customization-color (into [:enum] colors/account-colors))
(defn register-schemas
[]
(registry/register ::profile-picture-source ?profile-picture-source)
(registry/register ::customization-color ?customization-color))