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

View File

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