♻️ Fix component schemas (#7481)

This commit is contained in:
Eva Marco 2025-10-13 11:20:43 +02:00 committed by GitHub
parent 1b9deecefc
commit adafe0648c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 8 deletions

View File

@ -13,7 +13,7 @@
(def ^:private schema::hint-message (def ^:private schema::hint-message
[:map [:map
[:message :string] [:message [:or fn? :string]]
[:id :string] [:id :string]
[:type {:optional true} [:enum "hint" "error" "warning"]] [:type {:optional true} [:enum "hint" "error" "warning"]]
[:class {:optional true} :string]]) [:class {:optional true} :string]])

View File

@ -172,9 +172,7 @@
[:id {:optional true} :string] [:id {:optional true} :string]
[:offset {:optional true} :int] [:offset {:optional true} :int]
[:delay {:optional true} :int] [:delay {:optional true} :int]
;; TODO: Review why html element crash schema [:content [:or fn? :string]]
;; https://tree.taiga.io/project/penpot/task/12039
;; [:content [:or fn? :string [:fn mf/element?]]]
[:placement {:optional true} [:placement {:optional true}
[:maybe [:enum "top" "bottom" "left" "right" "top-right" "bottom-right" "bottom-left" "top-left"]]]]) [:maybe [:enum "top" "bottom" "left" "right" "top-right" "bottom-right" "bottom-left" "top-left"]]]])

View File

@ -104,10 +104,10 @@
has-errors has-errors
(tr "color-row.token-color-row.deleted-token") (tr "color-row.token-color-row.deleted-token")
:else :else
(mf/html #(mf/html
[:div [:div
[:span (dm/str (tr "workspace.tokens.token-name") ": ")] [:span (dm/str (tr "workspace.tokens.token-name") ": ")]
[:span {:class (stl/css :token-name-tooltip)} color-token]]))] [:span {:class (stl/css :token-name-tooltip)} color-token]]))]
[:div {:class (stl/css :color-info)} [:div {:class (stl/css :color-info)}
[:div {:class (stl/css-case :token-color-wrapper true [:div {:class (stl/css-case :token-color-wrapper true