mirror of
https://github.com/penpot/penpot.git
synced 2025-04-14 07:51:35 -05:00
✨ Use new convention for components for workspace right and left sidebar
This commit is contained in:
parent
b6aaba456e
commit
e7b0e253d4
3 changed files with 11 additions and 13 deletions
|
@ -79,7 +79,6 @@
|
|||
[component new-component-id library-data]
|
||||
(let [components-v2 (dm/get-in library-data [:options :components-v2])]
|
||||
(if components-v2
|
||||
|
||||
(let [main-instance-page (ctf/get-component-page library-data component)
|
||||
main-instance-shape (ctf/get-component-root library-data component)
|
||||
delta (gpt/point (+ (:width main-instance-shape) 50) 0)
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
[app.main.ui.workspace.nudge]
|
||||
[app.main.ui.workspace.palette :refer [palette]]
|
||||
[app.main.ui.workspace.plugins]
|
||||
[app.main.ui.workspace.sidebar :refer [left-sidebar right-sidebar]]
|
||||
[app.main.ui.workspace.sidebar :refer [left-sidebar* right-sidebar*]]
|
||||
[app.main.ui.workspace.sidebar.collapsable-button :refer [collapsed-button]]
|
||||
[app.main.ui.workspace.sidebar.history :refer [history-toolbox*]]
|
||||
[app.main.ui.workspace.tokens.modals]
|
||||
|
@ -111,14 +111,14 @@
|
|||
[:*
|
||||
(if (:collapse-left-sidebar layout)
|
||||
[:& collapsed-button]
|
||||
[:& left-sidebar {:layout layout
|
||||
[:> left-sidebar* {:layout layout
|
||||
:file file
|
||||
:page-id page-id}])
|
||||
[:> right-sidebar* {:section options-mode
|
||||
:selected selected
|
||||
:layout layout
|
||||
:file file
|
||||
:page-id page-id}])
|
||||
[:& right-sidebar {:section options-mode
|
||||
:selected selected
|
||||
:layout layout
|
||||
:file file
|
||||
:page-id page-id}]])]))
|
||||
:page-id page-id}]])]))
|
||||
|
||||
(mf/defc workspace-loader*
|
||||
{::mf/private true}
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
:size "s"
|
||||
:aria-label (tr "workspace.sidebar.collapse")}]])
|
||||
|
||||
(mf/defc left-sidebar
|
||||
(mf/defc left-sidebar*
|
||||
{::mf/wrap [mf/memo]
|
||||
::mf/props :obj}
|
||||
[{:keys [layout file page-id] :as props}]
|
||||
|
@ -179,9 +179,8 @@
|
|||
|
||||
;; --- Right Sidebar (Component)
|
||||
|
||||
(mf/defc right-sidebar
|
||||
{::mf/wrap-props false
|
||||
::mf/wrap [mf/memo]}
|
||||
(mf/defc right-sidebar*
|
||||
{::mf/wrap [mf/memo]}
|
||||
[{:keys [layout section file page-id] :as props}]
|
||||
(let [drawing-tool (:tool (mf/deref refs/workspace-drawing))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue