mirror of
https://github.com/penpot/penpot.git
synced 2025-07-29 16:57:20 +02:00
Remove all usage of mx/component and replace that with rumext.
This commit is contained in:
parent
491d91b1ee
commit
671c2d912c
78 changed files with 328 additions and 503 deletions
|
@ -1,13 +1,11 @@
|
|||
(ns uxbox.main.ui.lightbox
|
||||
(:require [sablono.core :as html :refer-macros [html]]
|
||||
[rum.core :as rum]
|
||||
[lentes.core :as l]
|
||||
(:require [lentes.core :as l]
|
||||
[uxbox.main.store :as st]
|
||||
[uxbox.main.data.lightbox :as udl]
|
||||
[uxbox.util.mixins :as mx :include-macros true]
|
||||
[rumext.core :as mx :include-macros true]
|
||||
[uxbox.main.ui.keyboard :as k]
|
||||
[uxbox.util.dom :as dom]
|
||||
[uxbox.util.data :refer (classnames)]
|
||||
[uxbox.util.data :refer [classnames]]
|
||||
[goog.events :as events])
|
||||
(:import goog.events.EventType))
|
||||
|
||||
|
@ -47,23 +45,17 @@
|
|||
(events/unlistenByKey (::key own))
|
||||
(dissoc own ::key))
|
||||
|
||||
(defn- lightbox-render
|
||||
(mx/defcs lightbox
|
||||
{:mixins [mx/reactive]
|
||||
:will-mount lightbox-will-mount
|
||||
:will-unmount lightbox-will-umount}
|
||||
[own]
|
||||
(let [data (mx/react lightbox-ref)
|
||||
classes (classnames
|
||||
:hide (nil? data)
|
||||
:transparent (:transparent? data))]
|
||||
(html
|
||||
[:div.lightbox
|
||||
{:class classes
|
||||
:ref "parent"
|
||||
:on-click (partial on-out-clicked own)}
|
||||
(render-lightbox data)])))
|
||||
|
||||
(def lightbox
|
||||
(mx/component
|
||||
{:name "lightbox"
|
||||
:render lightbox-render
|
||||
:will-mount lightbox-will-mount
|
||||
:will-unmount lightbox-will-umount
|
||||
:mixins [mx/reactive]}))
|
||||
[:div.lightbox
|
||||
{:class classes
|
||||
:ref "parent"
|
||||
:on-click (partial on-out-clicked own)}
|
||||
(render-lightbox data)]))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue