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,10 +266,10 @@
[: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)}]]]
(if ^boolean shared? (if ^boolean shared?
[:input {:class (stl/css :item-unpublish) [:input {:class (stl/css :item-unpublish)
:type "button" :type "button"
@ -289,10 +291,10 @@
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}])]]
[:button {:class (stl/css :item-button) [:button {:class (stl/css :item-button)
:type "button" :type "button"
@ -323,10 +325,10 @@
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}])]]
[:button {:class (stl/css :item-button-shared) [:button {:class (stl/css :item-button-shared)
:data-library-id (dm/str id) :data-library-id (dm/str id)
:title (tr "workspace.libraries.shared-library-btn") :title (tr "workspace.libraries.shared-library-btn")