mirror of
https://github.com/penpot/penpot.git
synced 2025-04-15 16:31:25 -05:00
Add shape type hierarchy.
This commit is contained in:
parent
9072c816e8
commit
3fcd21635e
1 changed files with 15 additions and 0 deletions
|
@ -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
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
|
Loading…
Add table
Reference in a new issue