mirror of
https://github.com/penpot/penpot.git
synced 2026-03-31 00:29:37 +02:00
🎉 Allow complex interactions
This commit is contained in:
committed by
Andrey Antukh
parent
6c332b949b
commit
c7252a950b
@@ -185,9 +185,9 @@
|
||||
|
||||
;; Interactions
|
||||
|
||||
(s/def :internal.shape.interaction/event-type #{:click}) ; In the future we will have more options
|
||||
(s/def :internal.shape.interaction/action-type #{:navigate})
|
||||
(s/def :internal.shape.interaction/destination ::uuid)
|
||||
(s/def :internal.shape.interaction/event-type #{:click :hover})
|
||||
(s/def :internal.shape.interaction/action-type #{:navigate :open-overlay :close-overlay})
|
||||
(s/def :internal.shape.interaction/destination (s/nilable ::uuid))
|
||||
|
||||
(s/def :internal.shape/interaction
|
||||
(s/keys :req-un [:internal.shape.interaction/event-type
|
||||
@@ -197,6 +197,11 @@
|
||||
(s/def :internal.shape/interactions
|
||||
(s/coll-of :internal.shape/interaction :kind vector?))
|
||||
|
||||
(def default-interaction
|
||||
{:event-type :click
|
||||
:action-type :navigate
|
||||
:destination nil})
|
||||
|
||||
;; Size constraints
|
||||
|
||||
(s/def :internal.shape/constraints-h #{:left :right :leftright :center :scale})
|
||||
|
||||
Reference in New Issue
Block a user