0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-23 23:18:48 -05:00

🐛 Fix sidebar tabs when there are no design tokens

This commit is contained in:
Andrés Moya 2024-11-05 15:08:09 +01:00
parent 99fcd3556e
commit e641e93fd5

View file

@ -102,23 +102,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