mirror of
https://github.com/penpot/penpot.git
synced 2025-07-06 19:07:18 +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
|
on-select-library-color
|
||||||
(mf/use-fn
|
(mf/use-fn
|
||||||
|
(mf/deps data handle-change-color)
|
||||||
(fn [_ color]
|
(fn [_ color]
|
||||||
(st/emit! (dc/apply-color-from-colorpicker color))
|
(if (and (some? (:color color)) (some? (:gradient data)))
|
||||||
(on-change color)))
|
(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
|
on-add-library-color
|
||||||
(mf/use-fn
|
(mf/use-fn
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue