diff --git a/frontend/src/app/main/ui/inspect/attributes.cljs b/frontend/src/app/main/ui/inspect/attributes.cljs index 2eb274d4d5..8255782af5 100644 --- a/frontend/src/app/main/ui/inspect/attributes.cljs +++ b/frontend/src/app/main/ui/inspect/attributes.cljs @@ -36,7 +36,7 @@ :text [:visibility :geometry :text :shadow :blur :stroke :layout-element] :variant [:variant :geometry :fill :stroke :shadow :blur :layout :layout-element]}) -(mf/defc attributes +(mf/defc attributes* [{:keys [page-id file-id shapes frame from libraries share-id objects color-space]}] (let [shapes (hooks/use-equal-memo shapes) first-shape (first shapes) diff --git a/frontend/src/app/main/ui/inspect/code.cljs b/frontend/src/app/main/ui/inspect/code.cljs index 3e93b2898a..661bee9075 100644 --- a/frontend/src/app/main/ui/inspect/code.cljs +++ b/frontend/src/app/main/ui/inspect/code.cljs @@ -96,7 +96,7 @@ embed-images? (replace-map images-data))] (str/format page-template style-code markup-code))) -(mf/defc code +(mf/defc code* [{:keys [shapes frame on-expand from]}] (let [style-type* (mf/use-state "css") markup-type* (mf/use-state "html") diff --git a/frontend/src/app/main/ui/inspect/right_sidebar.cljs b/frontend/src/app/main/ui/inspect/right_sidebar.cljs index a91e4f2664..fb8a607aaf 100644 --- a/frontend/src/app/main/ui/inspect/right_sidebar.cljs +++ b/frontend/src/app/main/ui/inspect/right_sidebar.cljs @@ -16,8 +16,8 @@ [app.main.ui.ds.foundations.assets.icon :refer [icon*] :as i] [app.main.ui.ds.layout.tab-switcher :refer [tab-switcher*]] [app.main.ui.icons :as deprecated-icon] - [app.main.ui.inspect.attributes :refer [attributes]] - [app.main.ui.inspect.code :refer [code]] + [app.main.ui.inspect.attributes :refer [attributes*]] + [app.main.ui.inspect.code :refer [code*]] [app.main.ui.inspect.selection-feedback :refer [resolve-shapes]] [app.main.ui.inspect.styles :refer [styles-tab*]] [app.util.dom :as dom] @@ -122,8 +122,7 @@ (fn [] (if (seq shapes) (st/emit! (ptk/event ::ev/event {::ev/name "inspect-mode-click-element"})) - (handle-change-tab (if (contains? cf/flags :inspect-styles) :styles :info))) - (reset! color-space* "hex"))) + (handle-change-tab (if (contains? cf/flags :inspect-styles) :styles :info))))) [:aside {:class (stl/css-case :settings-bar-right true :viewer-code (= from :viewer))} @@ -189,41 +188,41 @@ :libraries libraries :file-id file-id}] :computed - [:& attributes {:color-space color-space - :page-id page-id - :objects objects - :file-id file-id - :frame frame - :shapes shapes - :from from - :libraries libraries - :share-id share-id}] + [:> attributes* {:color-space color-space + :page-id page-id + :objects objects + :file-id file-id + :frame frame + :shapes shapes + :from from + :libraries libraries + :share-id share-id}] :code - [:& code {:frame frame - :shapes shapes - :on-expand handle-expand - :from from}])] + [:> code* {:frame frame + :shapes shapes + :on-expand handle-expand + :from from}])] [:> tab-switcher* {:tabs tabs :selected (name @section) :on-change handle-change-tab :class (stl/css :viewer-tab-switcher)} (case @section :info - [:& attributes {:page-id page-id - :objects objects - :file-id file-id - :frame frame - :shapes shapes - :from from - :libraries libraries - :share-id share-id}] + [:> attributes* {:page-id page-id + :objects objects + :file-id file-id + :frame frame + :shapes shapes + :from from + :libraries libraries + :share-id share-id}] :code - [:& code {:frame frame - :shapes shapes - :on-expand handle-expand - :from from}])])]] + [:> code* {:frame frame + :shapes shapes + :on-expand handle-expand + :from from}])])]] [:div {:class (stl/css :empty)} [:div {:class (stl/css :code-info)} [:span {:class (stl/css :placeholder-icon)}