♻️ Migrate inspect fill/stroke deprecated blocks to modern syntax (#9392)

Signed-off-by: tmimmanuel <155203395+tmimmanuel@users.noreply.github.com>
Co-authored-by: tmimmanuel <155203395+tmimmanuel@users.noreply.github.com>
This commit is contained in:
tmimmanuel 2026-05-10 02:16:43 -10:00 committed by GitHub
parent ef4f57c4a1
commit f06a2ae4e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 11 deletions

View File

@ -27,8 +27,7 @@
;; DEPRECATED, use fill-block-styles* instead.
;; This component is kept for backward compatibility
(mf/defc fill-block
{::mf/wrap-props false}
(mf/defc fill-block*
[{:keys [objects shape]}]
(let [format* (mf/use-state :hex)
format (deref format*)
@ -84,7 +83,7 @@
:shape shape}])
(if (seq (:fills shape))
(for [value (:fills shape [])]
[:& fill-block {:key (str "fill-block-" (:id shape) value)
:shape value}])
[:& fill-block {:key (str "fill-block-only" (:id shape))
:shape shape}])))]])))
[:> fill-block* {:key (str "fill-block-" (:id shape) value)
:shape value}])
[:> fill-block* {:key (str "fill-block-only" (:id shape))
:shape shape}])))]])))

View File

@ -31,8 +31,7 @@
;; DEPRECATED, use stroke-block-styles* instead.
;; This component is kept for backward compatibility
(mf/defc stroke-block
{::mf/wrap-props false}
(mf/defc stroke-block*
[{:keys [objects shape stroke]}]
(let [format* (mf/use-state :hex)
format (deref format*)
@ -100,6 +99,6 @@
:shape shape
:color-space color-space
:stroke stroke}]
[:& stroke-block {:key (str "stroke-color-" (:id shape) stroke)
:shape shape
:stroke stroke}])))]])))
[:> stroke-block* {:key (str "stroke-color-" (:id shape) stroke)
:shape shape
:stroke stroke}])))]])))