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 0c388627e0..e8231b2891 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 @@ -292,7 +292,7 @@ (csu/get-token-dropdown-options typography-tokens nil)) selected-token-id* - (mf/use-state #(when current-token-name + (mf/use-state #(when (and (not= :multiple current-token-name) current-token-name) (:id (get-option-by-name dropdown-options current-token-name)))) selected-token-id (deref selected-token-id*) @@ -443,7 +443,7 @@ (mf/with-effect [applied-token-name dropdown-options] (reset! selected-token-id* - (when applied-token-name + (when (and (not= :multiple applied-token-name)applied-token-name) (:id (get-option-by-name dropdown-options applied-token-name))))) (mf/with-effect [token-dropdown-open?] @@ -475,18 +475,17 @@ (when main-menu-open? [:div {:class (stl/css :element-content)} (cond + (and token-typography-row-enabled? (= :multiple current-token-name) (= typography-id :multiple)) + [:div "Texts have multiple typography assets and typography tokens applied"] + + (and token-typography-row-enabled? (= :multiple current-token-name)) + [:div "token-multiple"] + (and token-typography-row-enabled? current-token-name) [:> token-typography-row* {:token-name current-token-name :detach-token detach-token :active-tokens (resolve-delay typography-tokens)}] - typography - [:& typography-entry {:file-id typography-file-id - :typography typography - :local? (= typography-file-id file-id) - :on-detach handle-detach-typography - :on-change handle-change-typography}] - (= typography-id :multiple) [:div {:class (stl/css :multiple-typography)} [:span {:class (stl/css :multiple-text)} (tr "workspace.libraries.text.multiple-typography")] @@ -495,6 +494,15 @@ :on-click handle-detach-typography :icon i/detach}]] + typography + [:& typography-entry {:file-id typography-file-id + :typography typography + :local? (= typography-file-id file-id) + :on-detach handle-detach-typography + :on-change handle-change-typography}] + + + :else [:> text-options #js {:ids ids :values values diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/shapes/multiple.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/shapes/multiple.cljs index 70827abf97..e889f28f9f 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/shapes/multiple.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/shapes/multiple.cljs @@ -274,7 +274,7 @@ (merge-attrs shape-attrs) (merge-attrs content-attrs)) - new-token-acc (merge-token-values token-acc content-attrs applied-tokens)] + new-token-acc (merge-token-values token-acc editable-attrs applied-tokens)] [(conj ids id) new-values new-token-acc])