0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-10 00:40:30 -05:00

Merge pull request #4144 from penpot/superalex-change-stroke-color-from-library-doesnt-work

🐛 Fix change stroke color from library doesn't work
This commit is contained in:
Aitor Moreno 2024-02-14 11:01:28 +01:00 committed by GitHub
commit 71bc4e5186
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View file

@ -442,6 +442,7 @@
(declare activate-colorpicker-color)
(declare activate-colorpicker-gradient)
(declare activate-colorpicker-image)
(declare update-colorpicker)
(defn apply-color-from-colorpicker
[color]
@ -453,8 +454,7 @@
(:image color) (activate-colorpicker-image)
(:color color) (activate-colorpicker-color)
(= :linear (get-in color [:gradient :type])) (activate-colorpicker-gradient :linear-gradient)
(= :radial (get-in color [:gradient :type])) (activate-colorpicker-gradient :radial-gradient))
(apply-color-from-palette color false)))))
(= :radial (get-in color [:gradient :type])) (activate-colorpicker-gradient :radial-gradient))))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

View file

@ -145,7 +145,8 @@
on-select-library-color
(mf/use-fn
(fn [_ color]
(st/emit! (dc/apply-color-from-colorpicker color))))
(st/emit! (dc/apply-color-from-colorpicker color))
(on-change color)))
on-add-library-color
(mf/use-fn