mirror of
https://github.com/penpot/penpot.git
synced 2025-05-19 22:06:10 +02:00
🐛 Allow select library colors on gradients
This commit is contained in:
parent
764d15412f
commit
ff88f30c74
1 changed files with 6 additions and 2 deletions
|
@ -159,9 +159,13 @@
|
|||
|
||||
on-select-library-color
|
||||
(mf/use-fn
|
||||
(mf/deps data handle-change-color)
|
||||
(fn [_ color]
|
||||
(st/emit! (dc/apply-color-from-colorpicker color))
|
||||
(on-change color)))
|
||||
(if (and (some? (:color color)) (some? (:gradient data)))
|
||||
(handle-change-color {:hex (:color color) :alpha (:opacity color)})
|
||||
(do
|
||||
(st/emit! (dc/apply-color-from-colorpicker color))
|
||||
(on-change color)))))
|
||||
|
||||
on-add-library-color
|
||||
(mf/use-fn
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue