From 5939db771ede2e57163cc8d0b3557e7bea915320 Mon Sep 17 00:00:00 2001 From: Florian Schroedl Date: Mon, 26 Aug 2024 14:34:41 +0200 Subject: [PATCH] Link up delete button & fix create theme ui jumping --- .../app/main/ui/workspace/tokens/modals/themes.cljs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/frontend/src/app/main/ui/workspace/tokens/modals/themes.cljs b/frontend/src/app/main/ui/workspace/tokens/modals/themes.cljs index a55c508fb..5ffee750b 100644 --- a/frontend/src/app/main/ui/workspace/tokens/modals/themes.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/modals/themes.cljs @@ -155,10 +155,14 @@ :on-select on-toggle-token-set :on-toggle on-toggle-token-set}]] [:div {:class (stl/css :edit-theme-footer)} - (when edit? + (if edit? [:button {:class (stl/css :button-secondary) - :type "button"} - "Delete"]) + :type "button" + :on-click (fn [] + (st/emit! (wdt/delete-token-theme (:id theme))) + (on-back))} + "Delete"] + [:div]) [:div {:class (stl/css :button-footer)} [:button {:class (stl/css :button-secondary) :type "button"