0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-10 09:08:31 -05:00

🎉 Add icons preview (develop only).

This commit is contained in:
Andrey Antukh 2020-03-20 13:09:48 +01:00
parent c7791fd68d
commit 28ebbe14ca
4 changed files with 38 additions and 2 deletions

View file

@ -65,6 +65,7 @@
@import 'main/partials/forms';
@import 'main/partials/loader';
@import 'main/partials/context-menu';
@import 'main/partials/debug-icons-preview';
//#################################################
// Resources

View file

@ -0,0 +1,20 @@
.debug-icons-preview {
display: flex;
flex-wrap: wrap;
overflow: scroll;
.icon-item {
padding: 10px;
display: flex;
flex-direction: column;
width: 120px;
height: 120px;
margin: 10px;
align-items: center;
svg {
width: 100%;
height: 100%;
}
}
}

View file

@ -93,3 +93,12 @@
{:id "loader-line"
:d
"M134.482 157.147v25l518.57.008.002-25-518.572-.008z"}]]]))
(mf/defrc debug-icons-preview
[props]
[:section.debug-icons-preview
(for [[key val] (ns-publics 'uxbox.builtins.icons)]
(when (not= key 'debug-icons-preview)
[:div.icon-item {:key key}
(deref val)
[:span (pr-str key)]]))])

View file

@ -17,7 +17,6 @@
[rumext.alpha :as mf]
[uxbox.builtins.icons :as i]
[uxbox.common.exceptions :as ex]
[uxbox.common.exceptions :as ex]
[uxbox.main.data.auth :refer [logout]]
[uxbox.main.refs :as refs]
[uxbox.main.store :as st]
@ -51,6 +50,9 @@
["/profile" :settings-profile]
["/password" :settings-password]]
(when *assert*
["/debug/icons-preview" :debug-icons-preview])
["/dashboard"
["/team/:team-id"
["/" :dashboard-team]
@ -68,7 +70,7 @@
["/palettes"
["" { :name :dashboard-library-palettes-index :section :palettes}]
["/:library-id" { :name :dashboard-library-palettes :section :palettes }]]
]]]
["/workspace/:file-id" :workspace]])
@ -101,6 +103,10 @@
:settings-password)
(mf/element settings/settings #js {:route route})
:debug-icons-preview
(when *assert*
(mf/element i/debug-icons-preview))
(:dashboard-search
:dashboard-team
:dashboard-project