mirror of
https://github.com/penpot/penpot.git
synced 2025-02-13 18:48:37 -05:00
🐛 Fixes problem with library and colors
This commit is contained in:
parent
f992c740d5
commit
5e299551b7
1 changed files with 9 additions and 11 deletions
|
@ -191,7 +191,7 @@
|
||||||
:options [[(tr "workspace.assets.delete") on-delete]]}])])]))
|
:options [[(tr "workspace.assets.delete") on-delete]]}])])]))
|
||||||
|
|
||||||
(mf/defc color-item
|
(mf/defc color-item
|
||||||
[{:keys [color local? locale file-id] :as props}]
|
[{:keys [color local? locale] :as props}]
|
||||||
(let [rename? (= (:color-for-rename @refs/workspace-local) (:id color))
|
(let [rename? (= (:color-for-rename @refs/workspace-local) (:id color))
|
||||||
id (:id color)
|
id (:id color)
|
||||||
input-ref (mf/use-ref)
|
input-ref (mf/use-ref)
|
||||||
|
@ -333,16 +333,14 @@
|
||||||
(when open?
|
(when open?
|
||||||
[:div.group-list
|
[:div.group-list
|
||||||
(for [color colors]
|
(for [color colors]
|
||||||
[:& color-item {:key (:id color)
|
(let [color (cond-> color
|
||||||
:color (if (:value color)
|
(:value color) (assoc :color (:value color) :opacity 1)
|
||||||
(-> color
|
(:value color) (dissoc :value)
|
||||||
(assoc :color (:value color)
|
true (assoc :file-id file-id))]
|
||||||
:opacity 1)
|
[:& color-item {:key (:id color)
|
||||||
(dissoc :value))
|
:color color
|
||||||
color)
|
:local? local?
|
||||||
:file-id file-id
|
:locale locale}]))])]))
|
||||||
:local? local?
|
|
||||||
:locale locale}])])]))
|
|
||||||
|
|
||||||
(mf/defc typography-box
|
(mf/defc typography-box
|
||||||
[{:keys [file file-id local? typographies locale open? on-open on-close] :as props}]
|
[{:keys [file file-id local? typographies locale open? on-open on-close] :as props}]
|
||||||
|
|
Loading…
Add table
Reference in a new issue