mirror of
https://github.com/penpot/penpot.git
synced 2025-12-11 22:14:05 +01:00
🐛 Fix font name hot update (#7316)
This commit is contained in:
@@ -828,7 +828,7 @@ custom-input-token-value-props: Custom props passed to the custom-input-token-va
|
||||
|
||||
on-select-font
|
||||
(mf/use-fn
|
||||
(mf/deps on-external-update-value set-font)
|
||||
(mf/deps on-external-update-value set-font font)
|
||||
(fn [{:keys [family] :as font}]
|
||||
(when font
|
||||
(set-font font)
|
||||
@@ -854,7 +854,7 @@ custom-input-token-value-props: Custom props passed to the custom-input-token-va
|
||||
{:placeholder (or placeholder (tr "workspace.tokens.token-font-family-value-enter"))
|
||||
:label label
|
||||
:aria-label aria-label
|
||||
:default-value default-value
|
||||
:value (or (:name font) default-value)
|
||||
:ref input-ref
|
||||
:on-blur on-blur
|
||||
:on-change on-update-value'
|
||||
|
||||
@@ -58,19 +58,15 @@
|
||||
(mf/defc input-token*
|
||||
{::mf/forward-ref true
|
||||
::mf/schema schema::input-token}
|
||||
[{:keys [class label placeholder value icon slot-start token-resolve-result] :rest props} ref]
|
||||
[{:keys [class label token-resolve-result] :rest props} ref]
|
||||
(let [error (not (nil? (:errors token-resolve-result)))
|
||||
id (mf/use-id)
|
||||
input-ref (mf/use-ref)
|
||||
props (mf/spread-props props {:id id
|
||||
:type "text"
|
||||
:class (stl/css :input)
|
||||
:placeholder placeholder
|
||||
:value value
|
||||
:variant "comfortable"
|
||||
:hint-type (when error "error")
|
||||
:slot-start slot-start
|
||||
:icon icon
|
||||
:ref (or ref input-ref)})]
|
||||
[:*
|
||||
[:div {:class (dm/str class " " (stl/css-case :wrapper true
|
||||
|
||||
Reference in New Issue
Block a user