♻️ Put token settings under config flag (#6551)

This commit is contained in:
Eva Marco 2025-05-26 12:57:32 +02:00 committed by GitHub
parent e5bc369e56
commit 3dfccdaf9b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -10,6 +10,7 @@
[app.common.data :as d] [app.common.data :as d]
[app.common.json :as json] [app.common.json :as json]
[app.common.types.tokens-lib :as ctob] [app.common.types.tokens-lib :as ctob]
[app.config :as cf]
[app.main.data.event :as ev] [app.main.data.event :as ev]
[app.main.data.modal :as modal] [app.main.data.modal :as modal]
[app.main.data.style-dictionary :as sd] [app.main.data.style-dictionary :as sd]
@ -414,13 +415,15 @@
:on-click on-export} :on-click on-export}
(tr "labels.export")]] (tr "labels.export")]]
[:> tooltip* {:tooltip-content "Tokens settings"
:id "button-setting"} (when (contains? cf/flags :token-units)
[:> icon-button* {:variant "secondary" [:> tooltip* {:tooltip-content "Tokens settings"
:icon "settings" :id "button-setting"}
:tooltip-id "button-setting" [:> icon-button* {:variant "secondary"
:aria-label "Settings" :icon "settings"
:on-click open-settings-modal}]]])) :tooltip-id "button-setting"
:aria-label "Settings"
:on-click open-settings-modal}]])]))
(mf/defc tokens-sidebar-tab* (mf/defc tokens-sidebar-tab*
{::mf/wrap [mf/memo]} {::mf/wrap [mf/memo]}