mirror of
https://github.com/penpot/penpot.git
synced 2026-04-25 11:18:36 +00:00
♻️ Use d/xf:add-index in stroke menu component
Signed-off-by: Andrey Antukh <niwi@niwi.nz>
This commit is contained in:
parent
8d89f2bdde
commit
6fd6d1c436
@ -54,6 +54,9 @@
|
||||
strokes (:strokes values)
|
||||
has-strokes? (or (= :multiple strokes) (some? (seq strokes)))
|
||||
|
||||
strokes
|
||||
(mf/with-memo [strokes]
|
||||
(into [] d/xf:add-index strokes))
|
||||
|
||||
on-color-change
|
||||
(mf/use-fn
|
||||
@ -206,7 +209,7 @@
|
||||
:icon i/remove}]]
|
||||
(seq strokes)
|
||||
[:> h/sortable-container* {}
|
||||
(for [[index value] (d/enumerate (:strokes values []))]
|
||||
(for [{:keys [::d/index] :as value} strokes]
|
||||
[:> stroke-row* {:key (dm/str "stroke-" index)
|
||||
:stroke value
|
||||
:title (tr "workspace.options.stroke-color")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user