mirror of
https://github.com/penpot/penpot.git
synced 2025-06-12 20:31:39 +02:00
🐛 Fix problems in inspect tab
This commit is contained in:
parent
9834195f0e
commit
e2446fcc62
8 changed files with 65 additions and 48 deletions
|
@ -17,11 +17,13 @@
|
|||
{::mf/wrap [mf/memo]
|
||||
::mf/wrap-props false}
|
||||
[{:keys [color on-click mini? area]}]
|
||||
(let [on-click (mf/use-fn
|
||||
(mf/deps color on-click)
|
||||
(fn [event]
|
||||
(when (fn? on-click)
|
||||
(^function on-click color event))))]
|
||||
(let [read-only? (nil? on-click)
|
||||
on-click
|
||||
(mf/use-fn
|
||||
(mf/deps color on-click)
|
||||
(fn [event]
|
||||
(when (fn? on-click)
|
||||
(^function on-click color event))))]
|
||||
|
||||
(if (uc/multiple? color)
|
||||
[:div {:on-click on-click :class (stl/css :color-bullet :multiple)}]
|
||||
|
@ -39,7 +41,9 @@
|
|||
:is-not-library-color (nil? id)
|
||||
:is-gradient (some? gradient)
|
||||
:is-transparent (and opacity (> 1 opacity))
|
||||
:grid-area area)
|
||||
:grid-area area
|
||||
:read-only read-only?)
|
||||
:data-readonly (str read-only?)
|
||||
:on-click on-click}
|
||||
|
||||
(cond
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
height: 100%;
|
||||
background-color: var(--color-bullet-background-color);
|
||||
}
|
||||
&:hover {
|
||||
&:hover:not(.read-only) {
|
||||
border: $s-2 solid var(--color-bullet-border-color-selected);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue