mirror of
https://github.com/penpot/penpot.git
synced 2025-12-11 22:14:05 +01:00
🐛 Fix hover position of lock proportion tooltip
This commit is contained in:
@@ -20,13 +20,15 @@
|
||||
[:icon
|
||||
[:and :string [:fn #(contains? icon-list %)]]]
|
||||
[:aria-label :string]
|
||||
[:tooltip-placement {:optional true}
|
||||
[:maybe [:enum "top" "bottom" "left" "right" "top-right" "bottom-right" "bottom-left" "top-left"]]]
|
||||
[:variant {:optional true}
|
||||
[:maybe [:enum "primary" "secondary" "ghost" "destructive" "action"]]]])
|
||||
|
||||
(mf/defc icon-button*
|
||||
{::mf/schema schema:icon-button
|
||||
::mf/memo true}
|
||||
[{:keys [class icon icon-class variant aria-label children] :rest props}]
|
||||
[{:keys [class icon icon-class variant aria-label children tooltip-placement] :rest props}]
|
||||
(let [variant
|
||||
(d/nilv variant "primary")
|
||||
|
||||
@@ -47,6 +49,7 @@
|
||||
:aria-labelledby tooltip-id})]
|
||||
|
||||
[:> tooltip* {:content aria-label
|
||||
:placement tooltip-placement
|
||||
:id tooltip-id}
|
||||
[:> :button props
|
||||
[:> icon* {:icon-id icon :aria-hidden true :class icon-class}]
|
||||
|
||||
@@ -528,6 +528,7 @@
|
||||
:value (:height values)}]]])
|
||||
|
||||
[:> icon-button* {:variant "ghost"
|
||||
:tooltip-placement "top-left"
|
||||
:icon (if proportion-lock "lock" "unlock")
|
||||
:class (stl/css-case :selected (true? proportion-lock))
|
||||
:disabled (= proportion-lock :multiple)
|
||||
|
||||
Reference in New Issue
Block a user