0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-24 23:49:45 -05:00

Add debug old icons

This commit is contained in:
alonso.torres 2024-03-01 11:08:49 +01:00
parent 1f0683498f
commit bf898bfdc9
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}]])))