0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-21 06:02:32 -05:00

🐛 Fix sidebar tabs when there are no design tokens

This commit is contained in:
Andrés Moya 2024-10-31 15:18:39 +01:00 committed by Andrés Moya
parent a1fd7a912e
commit b47c5f9e60

View file

@ -101,23 +101,30 @@
(mf/html [:& assets-toolbox {:size (- size 58)}])
tokens-tab
(mf/html [:& tokens-sidebar-tab])
(when design-tokens?
(mf/html [:& tokens-sidebar-tab]))
tabs
(if ^boolean mode-inspect?
#js [#js {:label (tr "workspace.sidebar.layers")
:id "layers"
:content layers-tab}]
#js [#js {:label (tr "workspace.sidebar.layers")
:id "layers"
:content layers-tab}
#js {:label (tr "workspace.toolbar.assets")
:id "assets"
:content assets-tab}
(when design-tokens?
(if ^boolean design-tokens?
#js [#js {:label (tr "workspace.sidebar.layers")
:id "layers"
:content layers-tab}
#js {:label (tr "workspace.toolbar.assets")
:id "assets"
:content assets-tab}
#js {:label "Tokens"
:id "tokens"
:content tokens-tab})])]
:content tokens-tab}]
#js [#js {:label (tr "workspace.sidebar.layers")
:id "layers"
:content layers-tab}
#js {:label (tr "workspace.toolbar.assets")
:id "assets"
:content assets-tab}]))]
[:& (mf/provider muc/sidebar) {:value :left}
[:aside {:ref parent-ref