mirror of
https://github.com/penpot/penpot.git
synced 2025-07-10 17:17:17 +02:00
Next commit
This commit is contained in:
parent
22e497398f
commit
02a19a6b33
1 changed files with 16 additions and 13 deletions
|
@ -31,10 +31,13 @@
|
||||||
#uuid "0381446e-1f1d-423f-912c-ab577d61b79b" {:type :set
|
#uuid "0381446e-1f1d-423f-912c-ab577d61b79b" {:type :set
|
||||||
:name "Set Root 2"}})
|
:name "Set Root 2"}})
|
||||||
|
|
||||||
(defn render-set [set-id]
|
|
||||||
|
(mf/defc render-set
|
||||||
|
[{:keys [set-id]}]
|
||||||
(println "Rendering set with ID:" set-id)
|
(println "Rendering set with ID:" set-id)
|
||||||
(let [set (get sets set-id)
|
(let [set (get sets set-id)]
|
||||||
{:keys [type name children]} set
|
(when set
|
||||||
|
(let [{:keys [type name children]} set
|
||||||
icon (if (= type :group) i/document i/document)] ;; Correct icon for groups
|
icon (if (= type :group) i/document i/document)] ;; Correct icon for groups
|
||||||
[:div {:class (stl/css-case :set-item true :group (= type :group))}
|
[:div {:class (stl/css-case :set-item true :group (= type :group))}
|
||||||
[:div {:class (stl/css :set-icon)} icon]
|
[:div {:class (stl/css :set-icon)} icon]
|
||||||
|
@ -44,7 +47,7 @@
|
||||||
(for [child-id children]
|
(for [child-id children]
|
||||||
(do
|
(do
|
||||||
(println "Rendering child ID:" child-id)
|
(println "Rendering child ID:" child-id)
|
||||||
^{:key (str child-id)} [render-set child-id]))])]))
|
^{:key (str child-id)} [:& render-set {:key (str child-id):set-id child-id}]))])]))))
|
||||||
|
|
||||||
(mf/defc sets-list
|
(mf/defc sets-list
|
||||||
{::mf/wrap-props false}
|
{::mf/wrap-props false}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue