0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-06 14:50:20 -05:00

add icon lightbox

This commit is contained in:
Juan de la Cruz 2015-12-16 10:58:34 +01:00 committed by Andrey Antukh
parent 21d564b609
commit 67081eded4

View file

@ -154,6 +154,7 @@
]
[:div.dashboard-grid-content
[:div.grid-item.small-item.add-project
{on-click #(lightbox/set! :new-icon)}
[:span "+ New icon"]]
[:div.grid-item.small-item.project-th
[:span.grid-item-image i/logo-icon]
@ -411,9 +412,12 @@
:name "colors"
:mixins [rum/static]}))
;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Lightbox
;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ADD ELEMENT LIGHTBOX
(defn- new-element-lightbox-render
[own]
@ -443,3 +447,35 @@
(defmethod lightbox/render-lightbox :new-element
[_]
(new-element-lightbox))
;; ADD ICON LIGHTBOX
(defn- new-icon-lightbox-render
[own]
(html
[:div.lightbox-body
[:h3 "New icon"]
[:div.row-flex
[:div.lightbox-big-btn
[:span.big-svg i/shapes]
[:span.text "Go to workspace"]
]
[:div.lightbox-big-btn
[:span.big-svg.upload i/exit]
[:span.text "Upload file"]
]
]
[:a.close {:href "#"
:on-click #(do (dom/prevent-default %)
(lightbox/close!))}
i/close]]))
(def new-icon-lightbox
(util/component
{:render new-icon-lightbox-render
:name "new-icon-lightbox"}))
(defmethod lightbox/render-lightbox :new-icon
[_]
(new-icon-lightbox))