mirror of
https://github.com/penpot/penpot.git
synced 2025-03-13 00:01:51 -05:00
🔥 Remove obsoleted props on colorpalette component.
This commit is contained in:
parent
a548bd7ffd
commit
1d6905cb25
2 changed files with 5 additions and 8 deletions
|
@ -59,10 +59,8 @@
|
|||
file (obj/get props "file")
|
||||
layout (obj/get props "layout")]
|
||||
[:*
|
||||
;; TODO: left-sidebar option is obsolete because left-sidebar now
|
||||
;; is always visible.
|
||||
(when (:colorpalette layout)
|
||||
[:& colorpalette {:left-sidebar? true}])
|
||||
[:& colorpalette])
|
||||
|
||||
[:section.workspace-content
|
||||
[:section.workspace-viewport
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
[:& cb/color-name {:color color :size size}]]))
|
||||
|
||||
(mf/defc palette
|
||||
[{:keys [left-sidebar? current-colors recent-colors file-colors shared-libs selected size]}]
|
||||
[{:keys [current-colors recent-colors file-colors shared-libs selected size]}]
|
||||
(let [state (mf/use-state {:show-menu false })
|
||||
|
||||
width (:width @state 0)
|
||||
|
@ -120,7 +120,7 @@
|
|||
(fn []
|
||||
(events/unlistenByKey key1))))
|
||||
|
||||
[:div.color-palette {:class (when left-sidebar? "left-sidebar-open")}
|
||||
[:div.color-palette.left-sidebar-open
|
||||
[:& dropdown {:show (:show-menu @state)
|
||||
:on-close #(swap! state assoc :show-menu false)}
|
||||
[:ul.workspace-context-menu.palette-menu
|
||||
|
@ -192,7 +192,7 @@
|
|||
(vals))))
|
||||
|
||||
(mf/defc colorpalette
|
||||
[{:keys [left-sidebar?]}]
|
||||
[]
|
||||
(let [team-id (mf/use-ctx ctx/current-team-id)
|
||||
recent-colors (mf/deref refs/workspace-recent-colors)
|
||||
file-colors (mf/deref refs/workspace-file-colors)
|
||||
|
@ -225,8 +225,7 @@
|
|||
(reset! current-library-colors (into [] (->> (vals file-colors)
|
||||
(sort-by :name)))))))
|
||||
|
||||
[:& palette {:left-sidebar? left-sidebar?
|
||||
:current-colors @current-library-colors
|
||||
[:& palette {:current-colors @current-library-colors
|
||||
:recent-colors recent-colors
|
||||
:file-colors file-colors
|
||||
:shared-libs shared-libs
|
||||
|
|
Loading…
Add table
Reference in a new issue