mirror of
https://github.com/penpot/penpot.git
synced 2025-08-04 08:48:27 +02:00
🎉 Allow complex interactions
This commit is contained in:
parent
6c332b949b
commit
c7252a950b
16 changed files with 306 additions and 159 deletions
|
@ -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})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue