mirror of
https://github.com/penpot/penpot.git
synced 2025-08-07 14:38:33 +02:00
🐛 Fix remove color button in the gradient editor (#6942)
This commit is contained in:
parent
4effd375a9
commit
d46b519524
3 changed files with 5 additions and 5 deletions
|
@ -276,10 +276,9 @@
|
|||
handle-gradient-remove-stop
|
||||
(mf/use-fn
|
||||
(mf/deps state)
|
||||
(fn [stop]
|
||||
(fn [index]
|
||||
(when (> (count (:stops state)) 2)
|
||||
(when-let [index (d/index-of-pred (:stops state) #(= % stop))]
|
||||
(st/emit! (dc/remove-gradient-stop index))))))
|
||||
(st/emit! (dc/remove-gradient-stop index)))))
|
||||
|
||||
handle-stop-edit-start
|
||||
(mf/use-fn
|
||||
|
|
|
@ -80,10 +80,10 @@
|
|||
|
||||
handle-remove-stop
|
||||
(mf/use-callback
|
||||
(mf/deps on-remove-stop stop)
|
||||
(mf/deps on-remove-stop index)
|
||||
(fn []
|
||||
(when on-remove-stop
|
||||
(on-remove-stop stop))))
|
||||
(on-remove-stop index))))
|
||||
|
||||
handle-focus-stop-offset
|
||||
(mf/use-fn
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue