mirror of
https://github.com/penpot/penpot.git
synced 2025-01-08 07:50:43 -05:00
💄 Fix sample-library-entry component syntax style
This commit is contained in:
parent
257d72ee9d
commit
ce1ba3f28f
1 changed files with 12 additions and 4 deletions
|
@ -107,8 +107,10 @@
|
||||||
(tr "workspace.libraries.typography" typography-count)])])
|
(tr "workspace.libraries.typography" typography-count)])])
|
||||||
|
|
||||||
|
|
||||||
(mf/defc sample-library-entry
|
(mf/defc sample-library-entry*
|
||||||
[{:keys [library project-id team-id importing] :as props}]
|
{::mf/props :obj
|
||||||
|
::mf/private true}
|
||||||
|
[{:keys [library project-id team-id importing]}]
|
||||||
(let [id (:id library)
|
(let [id (:id library)
|
||||||
importing? (deref importing)
|
importing? (deref importing)
|
||||||
|
|
||||||
|
@ -137,7 +139,9 @@
|
||||||
[:div {:class (stl/css :sample-library-item)
|
[:div {:class (stl/css :sample-library-item)
|
||||||
:key (dm/str id)}
|
:key (dm/str id)}
|
||||||
[:div {:class (stl/css :sample-library-item-name)} (:name library)]
|
[:div {:class (stl/css :sample-library-item-name)} (:name library)]
|
||||||
[:input {:class (stl/css-case :sample-library-button true :sample-library-add (nil? importing?) :sample-library-adding (some? importing?))
|
[:input {:class (stl/css-case :sample-library-button true
|
||||||
|
:sample-library-add (nil? importing?)
|
||||||
|
:sample-library-adding (some? importing?))
|
||||||
:type "button"
|
:type "button"
|
||||||
:value (if (= importing? id) (tr "labels.adding") (tr "labels.add"))
|
:value (if (= importing? id) (tr "labels.adding") (tr "labels.add"))
|
||||||
:on-click import-library}]]))
|
:on-click import-library}]]))
|
||||||
|
@ -346,7 +350,11 @@
|
||||||
[:div {:class (stl/css :sample-libraries-container)}
|
[:div {:class (stl/css :sample-libraries-container)}
|
||||||
(tr "workspace.libraries.empty.add-some")
|
(tr "workspace.libraries.empty.add-some")
|
||||||
(for [library sample-libraries]
|
(for [library sample-libraries]
|
||||||
[:& sample-library-entry {:library library :project-id project-id :team-id team-id :importing importing*}])]]
|
[:> sample-library-entry*
|
||||||
|
{:library library
|
||||||
|
:project-id project-id
|
||||||
|
:team-id team-id
|
||||||
|
:importing importing*}])]]
|
||||||
|
|
||||||
(str/empty? search-term)
|
(str/empty? search-term)
|
||||||
[:*
|
[:*
|
||||||
|
|
Loading…
Reference in a new issue