mirror of
https://github.com/penpot/penpot.git
synced 2026-09-10 22:19:19 +00:00
🐛 Fix token option schema (#7186)
* 🐛 Fix token option schema * 🐛 Fix numeric-input schema
This commit is contained in:
parent
c5958e4d61
commit
31e37f352d
@ -149,14 +149,14 @@
|
|||||||
(def ^:private schema:icon
|
(def ^:private schema:icon
|
||||||
[:and :string [:fn #(contains? icon-list %)]])
|
[:and :string [:fn #(contains? icon-list %)]])
|
||||||
|
|
||||||
;; TODO: Review schema props
|
|
||||||
(def ^:private schema:numeric-input
|
(def ^:private schema:numeric-input
|
||||||
[:map
|
[:map
|
||||||
[:id {:optional true} :string]
|
[:id {:optional true} :string]
|
||||||
[:class {:optional true} :string]
|
[:class {:optional true} :string]
|
||||||
;; [:value {:optional true} [:maybe [:or
|
[:value {:optional true} [:maybe [:or
|
||||||
;; :int
|
:int
|
||||||
;; :string]]]
|
:string
|
||||||
|
[:= :multiple]]]]
|
||||||
[:default {:optional true} [:maybe :string]]
|
[:default {:optional true} [:maybe :string]]
|
||||||
[:placeholder {:optional true} :string]
|
[:placeholder {:optional true} :string]
|
||||||
[:icon {:optional true} [:maybe schema:icon]]
|
[:icon {:optional true} [:maybe schema:icon]]
|
||||||
@ -301,7 +301,6 @@
|
|||||||
(when (fn? on-change)
|
(when (fn? on-change)
|
||||||
(on-change parsed))
|
(on-change parsed))
|
||||||
|
|
||||||
;; Comprar si es valor es necesario, sino borrar
|
|
||||||
(mf/set-ref-val! raw-value* (fmt/format-number parsed))
|
(mf/set-ref-val! raw-value* (fmt/format-number parsed))
|
||||||
(update-input (fmt/format-number parsed)))
|
(update-input (fmt/format-number parsed)))
|
||||||
|
|
||||||
|
|||||||
@ -18,11 +18,10 @@
|
|||||||
[:map
|
[:map
|
||||||
[:id {:optiona true} :string]
|
[:id {:optiona true} :string]
|
||||||
[:ref some?]
|
[:ref some?]
|
||||||
[:resolved {:optional true} [:or :number :string]]
|
[:resolved {:optional true} [:or :int :string]]
|
||||||
[:name {:optional true} :string]
|
[:name {:optional true} :string]
|
||||||
[:on-click {:optional true} fn?]
|
[:on-click {:optional true} fn?]
|
||||||
[:selected {:optional true} :boolean]
|
[:selected {:optional true} :boolean]
|
||||||
[:focused {:optional true} :boolean]
|
|
||||||
[:focused {:optional true} :boolean]])
|
[:focused {:optional true} :boolean]])
|
||||||
|
|
||||||
(mf/defc token-option*
|
(mf/defc token-option*
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user