0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-01 11:59:17 -05:00

Merge pull request #5262 from penpot/palba-add-libraries-dialog-event

 Send event when an user opens a modal
This commit is contained in:
Andrey Antukh 2024-11-07 20:52:52 +01:00 committed by GitHub
commit ec0079461e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -10,6 +10,7 @@
[app.common.uuid :as uuid]
[app.main.data.events :as ev]
[app.main.store :as st]
[beicon.v2.core :as rx]
[cljs.core :as c]
[potok.v2.core :as ptk]))
@ -30,6 +31,12 @@
(dissoc :type)
(assoc :name type)))
ptk/WatchEvent
(watch [_ _ _]
(rx/of (ptk/event
::ev/event
{::ev/name "show-modal" :type type})))
ptk/UpdateEvent
(update [_ state]
(assoc state ::modal {:id id