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

🐛 Fix icons preview page

This commit is contained in:
Eva 2024-01-09 16:17:31 +01:00 committed by Andrey Antukh
parent 5cb8ce3319
commit a8a784bea4
3 changed files with 44 additions and 9 deletions

View file

@ -1 +0,0 @@
<svg xmlns:xlink="http://www.w3.org/1999/xlink" width="12" xmlns="http://www.w3.org/2000/svg" height="12" id="screenshot-c8a53282-38ff-8005-8002-95490755d8cd" viewBox="0 0 12 12" style="-webkit-print-color-adjust: exact;" fill="none" version="1.1"><g id="shape-c8a53282-38ff-8005-8002-95490755d8cd"><defs><clipPath class="frame-clip-def frame-clip" id="frame-clip-c8a53282-38ff-8005-8002-95490755d8cd-rumext-id-1"><rect rx="0" ry="0" x="0" y="0" width="12" height="12" transform="matrix(1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000)"/></clipPath></defs><g clip-path="url(#frame-clip-c8a53282-38ff-8005-8002-95490755d8cd-rumext-id-1)"><clipPath class="frame-clip-def frame-clip" id="frame-clip-c8a53282-38ff-8005-8002-95490755d8cd-rumext-id-1"><rect rx="0" ry="0" x="0" y="0" width="12" height="12" transform="matrix(1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000)"/></clipPath><g class="fills" id="fills-c8a53282-38ff-8005-8002-95490755d8cd"><rect rx="0" ry="0" x="0" y="0" transform="matrix(1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000)" width="12" height="12" class="frame-background"/></g><g class="frame-children"><g id="shape-c8a53282-38ff-8005-8002-95490755d8d0"><g class="fills" id="fills-c8a53282-38ff-8005-8002-95490755d8d0"><path rx="0" ry="0" d="M2.000,10.000L10.000,2.000M2.000,2.000L10.000,2.000L10.000,10.000" style="fill: rgb(0, 0, 0);"/></g><g id="strokes-c8a53282-38ff-8005-8002-95490755d8d0" class="strokes"><g class="stroke-shape"><path rx="0" ry="0" d="M2.000,10.000L10.000,2.000M2.000,2.000L10.000,2.000L10.000,10.000" style="fill: none; stroke-width: 1; stroke: rgb(143, 157, 163); stroke-opacity: 1;"/></g></g></g></g></g></g></svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

View file

@ -3,14 +3,33 @@
flex-direction: column;
overflow: scroll;
height: 100%;
h1 {
color: white;
font-size: 24px;
display: block;
width: 100vw;
margin: 12px;
}
}
.debug-icons-preview {
display: flex;
flex-wrap: wrap;
h2 {
color: white;
font-size: 16px;
display: block;
width: 100vw;
margin: 12px;
}
.subtitle-old {
color: #ff3277;
}
.icon-item,
.cursor-item {
.cursor-item,
.icon-item-old {
padding: 10px;
display: flex;
flex-direction: column;
@ -24,12 +43,28 @@
height: 100%;
min-width: 16px;
min-height: 16px;
fill: black;
fill: none;
color: transparent;
stroke: black;
stroke: #91fadb;
}
span {
color: white;
max-width: 100px;
overflow: hidden;
font-size: 12px;
margin-top: 4px;
word-break: break-word;
min-height: 40px;
}
}
.cursor-item div,
.icon-item-old svg {
fill: #aab5ba;
stroke: none;
}
.cursor-item {
height: auto;
}

View file

@ -400,7 +400,6 @@
(def ^:icon msg-warning-refactor (icon-xref :msg-warning-refactor))
(def ^:icon move-refactor (icon-xref :move-refactor))
(def ^:icon open-link-refactor (icon-xref :open-link-refactor))
(def ^:icon open-refactor (icon-xref :open-refactor))
(def ^:icon padding-bottom-refactor (icon-xref :padding-bottom-refactor))
(def ^:icon padding-top-refactor (icon-xref :padding-top-refactor))
(def ^:icon padding-top-bottom-refactor (icon-xref :padding-top-bottom-refactor))
@ -496,17 +495,19 @@
refactor? (fn [[key]] (str/ends-with? key "Refactor"))]
[:*
[:section.debug-icons-preview
[:h2 "Classic"]
[:h2.subtitle-old "Classic (Deprecated)"]
(for [[key val] (remove refactor? entries)]
[:div.icon-item {:key key}
[:div.icon-item-old {:key key
:title key}
val
[:span key]])]
[:section.debug-icons-preview
[:h2 "Refactor"]
(for [[key val] (filter refactor? entries)]
[:div.icon-item {:key key}
(deref val)
[:div.icon-item {:key key
:title key}
val
[:span key]])]]))
(defn key->icon