From 28b33b9acc15dac4e2c335fec8fc5b22f4093844 Mon Sep 17 00:00:00 2001 From: Eva Marco Date: Thu, 23 Apr 2026 10:49:48 +0200 Subject: [PATCH] :bug: Fix props on text components (#9099) --- .../workspace/sidebar/options/menus/text.cljs | 29 ++++++++++--------- .../sidebar/options/menus/typography.cljs | 9 +++--- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/text.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/text.cljs index f4f1bd7ee3..f27ef298f0 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/text.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/text.cljs @@ -27,7 +27,7 @@ [app.main.ui.ds.foundations.assets.icon :as i] [app.main.ui.hooks :as hooks] [app.main.ui.icons :as deprecated-icon] - [app.main.ui.workspace.sidebar.options.menus.typography :refer [text-options + [app.main.ui.workspace.sidebar.options.menus.typography :refer [text-options* typography-entry]] [app.util.dom :as dom] [app.util.i18n :as i18n :refer [tr]] @@ -297,18 +297,19 @@ multiple? (->> values vals (d/seek #(= % :multiple))) - opts #js {:ids ids - :values values - :on-change on-change - :show-recent true - :on-blur - (fn [] - (ts/schedule - 100 - (fn [] - (when (not= "INPUT" (-> (dom/get-active) (dom/get-tag-name))) - (let [node (txu/get-text-editor-content)] - (dom/focus! node))))))}] + opts (mf/props + {:ids ids + :values values + :on-change on-change + :show-recent true + :on-blur + (fn [] + (ts/schedule + 100 + (fn [] + (when (not= "INPUT" (-> (dom/get-active) (dom/get-tag-name))) + (let [node (txu/get-text-editor-content)] + (dom/focus! node))))))})] (hooks/use-stream expand-stream @@ -346,7 +347,7 @@ deprecated-icon/detach]] :else - [:> text-options opts]) + [:> text-options* opts]) [:div {:class (stl/css :text-align-options)} [:> text-align-options* opts] diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/typography.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/typography.cljs index 940682be89..3a27f8aefa 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/typography.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/typography.cljs @@ -444,8 +444,7 @@ :value "lowercase" :id "text-transform-lowercase"}]]])) -(mf/defc text-options - {::mf/wrap-props false} +(mf/defc text-options* [{:keys [ids editor values on-change on-blur show-recent]}] (let [full-size-selector? (and show-recent (= (mf/use-ctx ctx/sidebar) :right)) opts #js {:editor editor @@ -502,9 +501,9 @@ :on-click on-close} deprecated-icon/tick]] - [:& text-options {:values typography - :on-change on-change - :show-recent false}]] + [:> text-options* {:values typography + :on-change on-change + :show-recent false}]] [:div {:class (stl/css :typography-info-wrapper)} [:div {:class (stl/css :typography-name-wrapper)}