mirror of
https://github.com/penpot/penpot.git
synced 2025-06-14 11:51:38 +02:00
🐛 Fix open color palette from colorpicker
This commit is contained in:
parent
f6ff80a3d4
commit
d14f4c5c4a
1 changed files with 10 additions and 1 deletions
|
@ -7,14 +7,18 @@
|
||||||
(ns app.main.ui.workspace.colorpicker.libraries
|
(ns app.main.ui.workspace.colorpicker.libraries
|
||||||
(:require
|
(:require
|
||||||
[app.common.data.macros :as dm]
|
[app.common.data.macros :as dm]
|
||||||
|
[app.main.data.events :as ev]
|
||||||
|
[app.main.data.workspace :as dw]
|
||||||
[app.main.data.workspace.colors :as mdc]
|
[app.main.data.workspace.colors :as mdc]
|
||||||
[app.main.refs :as refs]
|
[app.main.refs :as refs]
|
||||||
[app.main.store :as st]
|
[app.main.store :as st]
|
||||||
[app.main.ui.components.color-bullet :refer [color-bullet]]
|
[app.main.ui.components.color-bullet :refer [color-bullet]]
|
||||||
[app.main.ui.hooks :as h]
|
[app.main.ui.hooks :as h]
|
||||||
|
[app.main.ui.hooks.resize :as r]
|
||||||
[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
|
||||||
|
@ -81,7 +85,12 @@
|
||||||
i/plus])
|
i/plus])
|
||||||
|
|
||||||
[:div.color-bullet.button {:style {:background-color "var(--color-white)"}
|
[:div.color-bullet.button {:style {:background-color "var(--color-white)"}
|
||||||
:on-click #(st/emit! (mdc/show-palette @selected))}
|
:on-click(fn []
|
||||||
|
(r/set-resize-type! :bottom)
|
||||||
|
(dom/add-class! (dom/get-element-by-class "color-palette") "fade-out-down")
|
||||||
|
(ts/schedule 300 #(st/emit! (dw/remove-layout-flag :textpalette)
|
||||||
|
(-> (dw/toggle-layout-flag :colorpalette)
|
||||||
|
(vary-meta assoc ::ev/origin "workspace-colorpicker")))))}
|
||||||
i/palette]
|
i/palette]
|
||||||
|
|
||||||
(for [[idx color] (map-indexed vector @current-colors)]
|
(for [[idx color] (map-indexed vector @current-colors)]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue