mirror of
https://github.com/penpot/penpot.git
synced 2025-06-04 03:21:38 +02:00
🎉 Include sprite inline in a template.
This commit is contained in:
parent
4ad08a7449
commit
e5ea8bf302
5 changed files with 846 additions and 226 deletions
|
@ -10,11 +10,9 @@
|
|||
(ns app.main.ui.icons
|
||||
(:require [rumext.alpha]))
|
||||
|
||||
(def base-uri "/images/svg-sprite/symbol/svg/sprite.symbol.svg#icon-")
|
||||
|
||||
(defmacro icon-xref
|
||||
[id]
|
||||
(let [href (str base-uri (name id))]
|
||||
(let [href (str "#icon-" (name id))]
|
||||
`(rumext.alpha/html
|
||||
[:svg {:width 500 :height 500}
|
||||
[:use {:xlinkHref ~href}]])))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue