mirror of
https://github.com/penpot/penpot.git
synced 2026-04-25 11:18:36 +00:00
♻️ Convert coordinates to modern * component format
Convert coordinates to coordinates* using {:keys [...]} destructuring
and rename prop colorpalette? to is-colorpalette. Update call site in
workspace.cljs to use [:> ...] with new prop name.
This commit is contained in:
parent
175f122a0f
commit
bf7c12ae75
@ -96,7 +96,7 @@
|
||||
|
||||
[:section {:class (stl/css :workspace-viewport)}
|
||||
(when (dbg/enabled? :coordinates)
|
||||
[:& coordinates/coordinates {:colorpalette? colorpalette?}])
|
||||
[:> coordinates/coordinates* {:is-colorpalette colorpalette?}])
|
||||
|
||||
(when (dbg/enabled? :history-overlay)
|
||||
[:div {:class (stl/css :history-debug-overlay)}
|
||||
|
||||
@ -11,10 +11,10 @@
|
||||
[app.main.ui.hooks :as hooks]
|
||||
[rumext.v2 :as mf]))
|
||||
|
||||
(mf/defc coordinates
|
||||
[{:keys [colorpalette?]}]
|
||||
(mf/defc coordinates*
|
||||
[{:keys [is-colorpalette]}]
|
||||
(let [coords (hooks/use-rxsub ms/mouse-position)]
|
||||
[:div {:class (stl/css-case :container-color-palette-open colorpalette?
|
||||
[:div {:class (stl/css-case :container-color-palette-open is-colorpalette
|
||||
:container true)}
|
||||
[:span {:alt "x" :class (stl/css :coordinate)}
|
||||
(str "X: " (:x coords "-"))]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user