mirror of
https://github.com/penpot/penpot.git
synced 2026-04-27 12:18:32 +00:00
✨ Add minor style improvements for reorder-handler component
This commit is contained in:
parent
20d2d22f39
commit
027a7a457d
@ -7,15 +7,14 @@
|
||||
(ns app.main.ui.components.reorder-handler
|
||||
(:require-macros [app.main.style :as stl])
|
||||
(:require
|
||||
[app.main.ui.ds.foundations.assets.icon :refer [icon*] :as ic]
|
||||
[app.main.ui.ds.foundations.assets.icon :as ic]
|
||||
[rumext.v2 :as mf]))
|
||||
|
||||
(mf/defc reorder-handler
|
||||
{::mf/forward-ref true}
|
||||
[_ ref]
|
||||
(mf/defc reorder-handler*
|
||||
[{:keys [ref]}]
|
||||
[:*
|
||||
[:div {:ref ref :class (stl/css :reorder)}
|
||||
[:> icon*
|
||||
[:> ic/icon*
|
||||
{:icon-id ic/reorder
|
||||
:class (stl/css :reorder-icon)
|
||||
:aria-hidden true}]]
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
[app.config :as cfg]
|
||||
[app.main.features :as features]
|
||||
[app.main.ui.components.numeric-input :refer [numeric-input*]]
|
||||
[app.main.ui.components.reorder-handler :refer [reorder-handler]]
|
||||
[app.main.ui.components.reorder-handler :refer [reorder-handler*]]
|
||||
[app.main.ui.components.select :refer [select]]
|
||||
[app.main.ui.ds.buttons.icon-button :refer [icon-button*]]
|
||||
[app.main.ui.formats :as fmt]
|
||||
@ -139,7 +139,7 @@
|
||||
:dnd-over-top (= (:over dprops) :top)
|
||||
:dnd-over-bot (= (:over dprops) :bot))}
|
||||
|
||||
[:& reorder-handler {:ref dref}]
|
||||
[:> reorder-handler* {:ref dref}]
|
||||
|
||||
[:div {:class (stl/css :offset-input-wrapper)}
|
||||
[:span {:class (stl/css :icon-text)} "%"]
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
[app.main.data.workspace.undo :as dwu]
|
||||
[app.main.store :as st]
|
||||
[app.main.ui.components.numeric-input :refer [numeric-input*]]
|
||||
[app.main.ui.components.reorder-handler :refer [reorder-handler]]
|
||||
[app.main.ui.components.reorder-handler :refer [reorder-handler*]]
|
||||
[app.main.ui.components.select :refer [select]]
|
||||
[app.main.ui.components.title-bar :refer [title-bar]]
|
||||
[app.main.ui.ds.buttons.icon-button :refer [icon-button*]]
|
||||
@ -127,7 +127,7 @@
|
||||
:dnd-over-top (= (:over dprops) :top)
|
||||
:dnd-over-bot (= (:over dprops) :bot))}
|
||||
(when (some? on-reorder)
|
||||
[:& reorder-handler {:ref dref}])
|
||||
[:> reorder-handler* {:ref dref}])
|
||||
|
||||
[:*
|
||||
[:div {:class (stl/css :basic-options)}
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
[app.main.ui.components.color-bullet :as cb]
|
||||
[app.main.ui.components.color-input :refer [color-input*]]
|
||||
[app.main.ui.components.numeric-input :refer [numeric-input*]]
|
||||
[app.main.ui.components.reorder-handler :refer [reorder-handler]]
|
||||
[app.main.ui.components.reorder-handler :refer [reorder-handler*]]
|
||||
[app.main.ui.ds.buttons.icon-button :refer [icon-button*]]
|
||||
[app.main.ui.formats :as fmt]
|
||||
[app.main.ui.hooks :as h]
|
||||
@ -212,7 +212,7 @@
|
||||
|
||||
;; Drag handler
|
||||
(when (some? on-reorder)
|
||||
[:& reorder-handler {:ref dref}])
|
||||
[:> reorder-handler* {:ref dref}])
|
||||
|
||||
[:div {:class (stl/css :color-info)}
|
||||
[:div {:class (stl/css-case :color-name-wrapper true
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
[app.common.data :as d]
|
||||
[app.common.types.color :as ctc]
|
||||
[app.main.ui.components.numeric-input :refer [numeric-input*]]
|
||||
[app.main.ui.components.reorder-handler :refer [reorder-handler]]
|
||||
[app.main.ui.components.reorder-handler :refer [reorder-handler*]]
|
||||
[app.main.ui.components.select :refer [select]]
|
||||
[app.main.ui.hooks :as h]
|
||||
[app.main.ui.icons :as i]
|
||||
@ -145,7 +145,7 @@
|
||||
:dnd-over-bot (= (:over dprops) :bot))}
|
||||
|
||||
(when (some? on-reorder)
|
||||
[:& reorder-handler {:ref dref}])
|
||||
[:> reorder-handler* {:ref dref}])
|
||||
|
||||
;; Stroke Color
|
||||
;; FIXME: memorize stroke color
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user