mirror of
https://github.com/penpot/penpot.git
synced 2025-02-03 04:49:03 -05:00
Fix colorpalette rendering.
This commit is contained in:
parent
6a0a71de5a
commit
870c2d9fb1
1 changed files with 5 additions and 3 deletions
|
@ -51,7 +51,9 @@
|
||||||
{:mixins [mx/static mx/reactive (mx/local)]}
|
{:mixins [mx/static mx/reactive (mx/local)]}
|
||||||
[own]
|
[own]
|
||||||
(let [local (:rum/local own)
|
(let [local (:rum/local own)
|
||||||
collections (sort-by :name (mx/react collections-ref))
|
collections (->> (mx/react collections-ref)
|
||||||
|
(vals)
|
||||||
|
(sort-by :name))
|
||||||
collection (get-selected-collection local collections)]
|
collection (get-selected-collection local collections)]
|
||||||
(letfn [(select-collection [event]
|
(letfn [(select-collection [event]
|
||||||
(let [value (read-string (dom/event->value event))]
|
(let [value (read-string (dom/event->value event))]
|
||||||
|
@ -64,12 +66,12 @@
|
||||||
(for [collection collections]
|
(for [collection collections]
|
||||||
[:option {:key (str (:id collection))
|
[:option {:key (str (:id collection))
|
||||||
:value (pr-str (:id collection))}
|
:value (pr-str (:id collection))}
|
||||||
(:name collection)])]
|
(:name collection "Storage")])]
|
||||||
#_[:div.color-palette-buttons
|
#_[:div.color-palette-buttons
|
||||||
[:div.btn-palette.edit.current i/pencil]
|
[:div.btn-palette.edit.current i/pencil]
|
||||||
[:div.btn-palette.create i/close]]]
|
[:div.btn-palette.create i/close]]]
|
||||||
[:span.left-arrow i/arrow-slide]
|
[:span.left-arrow i/arrow-slide]
|
||||||
(palette-items (:data collection))
|
(palette-items (:colors collection))
|
||||||
[:span.right-arrow i/arrow-slide]
|
[:span.right-arrow i/arrow-slide]
|
||||||
[:span.close-palette {:on-click close}
|
[:span.close-palette {:on-click close}
|
||||||
i/close]])))
|
i/close]])))
|
||||||
|
|
Loading…
Add table
Reference in a new issue