0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-13 00:01:51 -05:00

Merge pull request #4211 from penpot/alotor-debug-icons

 Add debug old icons
This commit is contained in:
Eva Marco 2024-03-01 11:45:49 +01:00 committed by GitHub
commit 54511a5ef0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 14 additions and 1 deletions

View file

@ -12,3 +12,8 @@
body {
color: yellow;
}
.deprecated-icon {
fill: red !important;
stroke: red !important;
}

View file

@ -10,10 +10,18 @@
[cuerdas.core :as str]
[rumext.v2]))
(def exceptions #{:penpot-logo-icon})
(defmacro icon-xref
[id & [class]]
(let [href (str "#icon-" (name id))
class (or class (str "icon-" (name id)))]
class (or class (str "icon-" (name id)))
;; FIXME: Debug tool. Remove when we remove the old icons
class (cond-> class
(and (not (str/ends-with? (name id) "-refactor"))
(not (contains? exceptions id)))
(str " deprecated-icon"))]
`(rumext.v2/html
[:svg {:width 500 :height 500 :class ~class}
[:use {:href ~href}]])))