mirror of
https://github.com/penpot/penpot.git
synced 2025-02-13 02:28:18 -05:00
🐛 Fix colorpicker open palete library
This commit is contained in:
parent
f32aaee41f
commit
7f93c41005
1 changed files with 4 additions and 4 deletions
|
@ -21,7 +21,6 @@
|
||||||
[app.main.ui.icons :as i]
|
[app.main.ui.icons :as i]
|
||||||
[app.util.dom :as dom]
|
[app.util.dom :as dom]
|
||||||
[app.util.i18n :as i18n :refer [tr]]
|
[app.util.i18n :as i18n :refer [tr]]
|
||||||
[app.util.timers :as ts]
|
|
||||||
[rumext.v2 :as mf]))
|
[rumext.v2 :as mf]))
|
||||||
|
|
||||||
(mf/defc libraries
|
(mf/defc libraries
|
||||||
|
@ -51,12 +50,13 @@
|
||||||
|
|
||||||
toggle-palette
|
toggle-palette
|
||||||
(mf/use-fn
|
(mf/use-fn
|
||||||
|
(mf/deps @selected)
|
||||||
(fn []
|
(fn []
|
||||||
(r/set-resize-type! :bottom)
|
(r/set-resize-type! :bottom)
|
||||||
(dom/add-class! (dom/get-element-by-class "color-palette") "fade-out-down")
|
(dom/add-class! (dom/get-element-by-class "color-palette") "fade-out-down")
|
||||||
(ts/schedule 300 #(st/emit! (dw/remove-layout-flag :textpalette)
|
(st/emit! (dw/remove-layout-flag :textpalette)
|
||||||
(-> (dw/toggle-layout-flag :colorpalette)
|
(-> (mdc/show-palette @selected)
|
||||||
(vary-meta assoc ::ev/origin "workspace-colorpicker"))))))
|
(vary-meta assoc ::ev/origin "workspace-colorpicker")))))
|
||||||
|
|
||||||
shared-libs-options (mapv (fn [lib] {:value (d/name (:id lib)) :label (:name lib)}) (vals shared-libs))
|
shared-libs-options (mapv (fn [lib] {:value (d/name (:id lib)) :label (:name lib)}) (vals shared-libs))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue