0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-08 07:50:43 -05:00

💄 Fix describe-library-blocks component syntax decl style

This commit is contained in:
Andrey Antukh 2024-12-10 09:26:07 +01:00
parent ce1ba3f28f
commit e5d8bc91fb

View file

@ -87,8 +87,10 @@
(conj (tr "workspace.libraries.typography" typography-count)))) (conj (tr "workspace.libraries.typography" typography-count))))
"\u00A0"))) "\u00A0")))
(mf/defc describe-library-blocks (mf/defc describe-library-blocks*
[{:keys [components-count graphics-count colors-count typography-count] :as props}] {::mf/props :obj
::mf/private true}
[{:keys [components-count graphics-count colors-count typography-count]}]
[:* [:*
(when (pos? components-count) (when (pos? components-count)
[:li {:class (stl/css :element-count)} [:li {:class (stl/css :element-count)}
@ -264,7 +266,7 @@
[:div {:class (stl/css :item-content)} [:div {:class (stl/css :item-content)}
[:div {:class (stl/css :item-name)} (tr "workspace.libraries.file-library")] [:div {:class (stl/css :item-name)} (tr "workspace.libraries.file-library")]
[:ul {:class (stl/css :item-contents)} [:ul {:class (stl/css :item-contents)}
[:& describe-library-blocks {:components-count (count components) [:> describe-library-blocks* {:components-count (count components)
:graphics-count (count media) :graphics-count (count media)
:colors-count (count colors) :colors-count (count colors)
:typography-count (count typographies)}]]] :typography-count (count typographies)}]]]
@ -289,7 +291,7 @@
graphics-count (count (dm/get-in library [:data :media] [])) graphics-count (count (dm/get-in library [:data :media] []))
colors-count (count (dm/get-in library [:data :colors] [])) colors-count (count (dm/get-in library [:data :colors] []))
typography-count (count (dm/get-in library [:data :typographies] []))] typography-count (count (dm/get-in library [:data :typographies] []))]
[:& describe-library-blocks {:components-count components-count [:> describe-library-blocks* {:components-count components-count
:graphics-count graphics-count :graphics-count graphics-count
:colors-count colors-count :colors-count colors-count
:typography-count typography-count}])]] :typography-count typography-count}])]]
@ -323,7 +325,7 @@
graphics-count (dm/get-in library [:library-summary :media :count] 0) graphics-count (dm/get-in library [:library-summary :media :count] 0)
colors-count (dm/get-in library [:library-summary :colors :count] 0) colors-count (dm/get-in library [:library-summary :colors :count] 0)
typography-count (dm/get-in library [:library-summary :typographies :count] 0)] typography-count (dm/get-in library [:library-summary :typographies :count] 0)]
[:& describe-library-blocks {:components-count components-count [:> describe-library-blocks* {:components-count components-count
:graphics-count graphics-count :graphics-count graphics-count
:colors-count colors-count :colors-count colors-count
:typography-count typography-count}])]] :typography-count typography-count}])]]