mirror of
https://github.com/penpot/penpot.git
synced 2026-08-18 02:39:02 +00:00
13 lines
322 B
Clojure
13 lines
322 B
Clojure
(ns uxbox.shapes
|
|
(:require [sablono.core :refer-macros [html]]))
|
|
|
|
(defmulti render
|
|
(fn [shape & params]
|
|
(:type shape)))
|
|
|
|
(defmethod render :builtin/icon
|
|
[shape & [{:keys [width height] :or {width "500" height "500"}}]]
|
|
(let [content (:svg shape)]
|
|
(html
|
|
[:svg {:width width :height height} content])))
|