Skip to content
/ svgreq Public

Clojure macro for generating react component based on svg

Notifications You must be signed in to change notification settings

scopews/svgreq

Repository files navigation

Svgreq

Clojure macro for generating react component based on svg

Clojars Project

Usage

(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")

About

Clojure macro for generating react component based on svg

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published