From 2e23543c112caae6366e3a042b58feb8e8f5cc46 Mon Sep 17 00:00:00 2001 From: Florian Schroedl Date: Mon, 26 Aug 2024 15:04:45 +0200 Subject: [PATCH] Show create text when no theme is available --- frontend/src/app/main/ui/workspace/tokens/sidebar.cljs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/app/main/ui/workspace/tokens/sidebar.cljs b/frontend/src/app/main/ui/workspace/tokens/sidebar.cljs index 1451d5e39d..d2be88e404 100644 --- a/frontend/src/app/main/ui/workspace/tokens/sidebar.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/sidebar.cljs @@ -182,12 +182,12 @@ "Create"]])) (mf/defc edit-button - [{:keys []}] + [{:keys [create?]}] [:button {:class (stl/css :themes-button) :on-click (fn [e] (dom/stop-propagation e) (modal/show! :tokens/themes {}))} - "Edit"]) + (if create? "Create" "Edit")]) (mf/defc themes-sidebar [_props] @@ -205,7 +205,7 @@ {:value id :label name}) xs)) themes)}] - [:& edit-button]]])) + [:& edit-button {:create? (empty? themes)}]]])) (mf/defc sets-sidebar []