mirror of
https://github.com/penpot/penpot.git
synced 2025-02-03 21:09:00 -05:00
✨ Add debug old icons
This commit is contained in:
parent
1f0683498f
commit
bf898bfdc9
2 changed files with 14 additions and 1 deletions
|
@ -12,3 +12,8 @@
|
||||||
body {
|
body {
|
||||||
color: yellow;
|
color: yellow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.deprecated-icon {
|
||||||
|
fill: red !important;
|
||||||
|
stroke: red !important;
|
||||||
|
}
|
||||||
|
|
|
@ -10,10 +10,18 @@
|
||||||
[cuerdas.core :as str]
|
[cuerdas.core :as str]
|
||||||
[rumext.v2]))
|
[rumext.v2]))
|
||||||
|
|
||||||
|
(def exceptions #{:penpot-logo-icon})
|
||||||
|
|
||||||
(defmacro icon-xref
|
(defmacro icon-xref
|
||||||
[id & [class]]
|
[id & [class]]
|
||||||
(let [href (str "#icon-" (name id))
|
(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
|
`(rumext.v2/html
|
||||||
[:svg {:width 500 :height 500 :class ~class}
|
[:svg {:width 500 :height 500 :class ~class}
|
||||||
[:use {:href ~href}]])))
|
[:use {:href ~href}]])))
|
||||||
|
|
Loading…
Add table
Reference in a new issue