mirror of
https://github.com/penpot/penpot.git
synced 2026-05-07 00:58:48 +00:00
♻️ Migrate debug icons-preview to modern component syntax (#9381)
Signed-off-by: tmimmanuel <155203395+tmimmanuel@users.noreply.github.com> Co-authored-by: tmimmanuel <155203395+tmimmanuel@users.noreply.github.com> Co-authored-by: Andrey Antukh <niwi@niwi.nz>
This commit is contained in:
parent
0a0db15548
commit
bffec015d7
@ -18,7 +18,7 @@
|
||||
[app.main.router :as rt]
|
||||
[app.main.store :as st]
|
||||
[app.main.ui.context :as ctx]
|
||||
[app.main.ui.debug.icons-preview :refer [icons-preview]]
|
||||
[app.main.ui.debug.icons-preview :refer [icons-preview*]]
|
||||
[app.main.ui.debug.playground :refer [playground]]
|
||||
[app.main.ui.ds.product.loader :refer [loader*]]
|
||||
[app.main.ui.error-boundary :refer [error-boundary*]]
|
||||
@ -211,7 +211,7 @@
|
||||
|
||||
:debug-icons-preview
|
||||
(when *assert*
|
||||
[:& icons-preview])
|
||||
[:> icons-preview*])
|
||||
|
||||
:debug-playground
|
||||
(when *assert*
|
||||
|
||||
@ -7,9 +7,8 @@
|
||||
[cuerdas.core :as str]
|
||||
[rumext.v2 :as mf]))
|
||||
|
||||
(mf/defc icons-gallery
|
||||
{::mf/wrap-props false
|
||||
::mf/private true}
|
||||
(mf/defc icons-gallery*
|
||||
{::mf/private true}
|
||||
[]
|
||||
(let [entries (->> (seq (js/Object.entries deprecated-icon/default))
|
||||
(sort-by first))]
|
||||
@ -21,9 +20,8 @@
|
||||
val
|
||||
[:span key]])]))
|
||||
|
||||
(mf/defc cursors-gallery
|
||||
{::mf/wrap-props false
|
||||
::mf/private true}
|
||||
(mf/defc cursors-gallery*
|
||||
{::mf/private true}
|
||||
[]
|
||||
(let [rotation (mf/use-state 0)
|
||||
entries (->> (seq (js/Object.entries c/default))
|
||||
@ -43,12 +41,11 @@
|
||||
[:span (pr-str key)]]))]))
|
||||
|
||||
|
||||
(mf/defc icons-preview
|
||||
{::mf/wrap-props false}
|
||||
(mf/defc icons-preview*
|
||||
[]
|
||||
[:article {:class (stl/css :container)}
|
||||
[:h2 {:class (stl/css :title)} "Cursors"]
|
||||
[:& cursors-gallery]
|
||||
[:> cursors-gallery*]
|
||||
[:h2 {:class (stl/css :title)} "Icons"]
|
||||
[:& icons-gallery]])
|
||||
[:> icons-gallery*]])
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user