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
|
[:icon
|
||||||
[:and :string [:fn #(contains? icon-list %)]]]
|
[:and :string [:fn #(contains? icon-list %)]]]
|
||||||
[:aria-label :string]
|
[:aria-label :string]
|
||||||
|
[:tooltip-placement {:optional true}
|
||||||
|
[:maybe [:enum "top" "bottom" "left" "right" "top-right" "bottom-right" "bottom-left" "top-left"]]]
|
||||||
[:variant {:optional true}
|
[:variant {:optional true}
|
||||||
[:maybe [:enum "primary" "secondary" "ghost" "destructive" "action"]]]])
|
[:maybe [:enum "primary" "secondary" "ghost" "destructive" "action"]]]])
|
||||||
|
|
||||||
(mf/defc icon-button*
|
(mf/defc icon-button*
|
||||||
{::mf/schema schema:icon-button
|
{::mf/schema schema:icon-button
|
||||||
::mf/memo true}
|
::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
|
(let [variant
|
||||||
(d/nilv variant "primary")
|
(d/nilv variant "primary")
|
||||||
|
|
||||||
@@ -47,6 +49,7 @@
|
|||||||
:aria-labelledby tooltip-id})]
|
:aria-labelledby tooltip-id})]
|
||||||
|
|
||||||
[:> tooltip* {:content aria-label
|
[:> tooltip* {:content aria-label
|
||||||
|
:placement tooltip-placement
|
||||||
:id tooltip-id}
|
:id tooltip-id}
|
||||||
[:> :button props
|
[:> :button props
|
||||||
[:> icon* {:icon-id icon :aria-hidden true :class icon-class}]
|
[:> icon* {:icon-id icon :aria-hidden true :class icon-class}]
|
||||||
|
|||||||
@@ -528,6 +528,7 @@
|
|||||||
:value (:height values)}]]])
|
:value (:height values)}]]])
|
||||||
|
|
||||||
[:> icon-button* {:variant "ghost"
|
[:> icon-button* {:variant "ghost"
|
||||||
|
:tooltip-placement "top-left"
|
||||||
:icon (if proportion-lock "lock" "unlock")
|
:icon (if proportion-lock "lock" "unlock")
|
||||||
:class (stl/css-case :selected (true? proportion-lock))
|
:class (stl/css-case :selected (true? proportion-lock))
|
||||||
:disabled (= proportion-lock :multiple)
|
:disabled (= proportion-lock :multiple)
|
||||||
|
|||||||
Reference in New Issue
Block a user