diff --git a/frontend/uxbox/shapes.cljs b/frontend/uxbox/shapes.cljs index 34f09e12fd..40214290b4 100644 --- a/frontend/uxbox/shapes.cljs +++ b/frontend/uxbox/shapes.cljs @@ -2,6 +2,21 @@ (:require [sablono.core :refer-macros [html]] [uxbox.util.data :refer (remove-nil-vals)])) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Types +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(def ^:static ^:private +hierarchy+ + (as-> (make-hierarchy) $ + (derive $ :builtin/icon ::shape) + (derive $ :builtin/icon-svg ::shape) + (derive $ :builtin/icon-group ::shape))) + +(defn shape? + [type] + {:pre [(keyword? type)]} + (isa? +hierarchy+ type ::shape)) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Api ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;