Clojure macro for generating react component based on svg
(def BellSvg (svgreq.core/embed "resources/icons" "bell"))
To simplify the definition of an SVG component, you can create a simple macro:
(defmacro defsvgc
[sym icon]
`(def ~sym (svgreq.core/embed
"resources/icons" ~icon
{:display-name ~sym})))
and usage
(defsvgc BellSvg "bell")
Can you improve this documentation? These fine people already did:
khmelevskii & Yuri KhmelvskyEdit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close