0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-18 10:41:29 -05:00

Add delete confirmation to colors collections.

This commit is contained in:
Andrey Antukh 2016-11-07 22:13:12 +01:00
parent aec2166759
commit 151da534c2
No known key found for this signature in database
GPG key ID: 4DFEBCB8316A8B95

View file

@ -63,8 +63,10 @@
(dom/prevent-default e)
(dom/stop-propagation e)
(save))))
(delete-collection []
(rs/emit! (dc/delete-collection (:id coll))))]
(delete []
(rs/emit! (dc/delete-collection id)))
(on-delete []
(udl/open! :confirm {:on-accept delete}))]
[:div.dashboard-title
[:h2
(if edit?
@ -86,7 +88,7 @@
(if edit?
[:span {:on-click save} i/save]
[:span {:on-click edit} i/pencil])
[:span {:on-click delete-collection} i/trash]])])))
[:span {:on-click on-delete} i/trash]])])))
;; --- Nav