mirror of
https://github.com/penpot/penpot.git
synced 2025-06-04 09:21:38 +02:00
✨ Add some enhancements to context menus
This commit is contained in:
parent
b547f1cd7e
commit
81a604dca2
8 changed files with 13 additions and 4 deletions
|
@ -33,6 +33,7 @@
|
|||
top (gobj/get props "top" 0)
|
||||
left (gobj/get props "left" 0)
|
||||
fixed? (gobj/get props "fixed?" false)
|
||||
min-width? (gobj/get props "min-width?" false)
|
||||
|
||||
local (mf/use-state {:offset 0
|
||||
:levels nil})
|
||||
|
@ -89,7 +90,8 @@
|
|||
:style {:top (+ top (:offset @local))
|
||||
:left left}}
|
||||
(let [level (-> @local :levels peek)]
|
||||
[:ul.context-menu-items {:ref check-menu-offscreen}
|
||||
[:ul.context-menu-items {:class (classnames :min-width min-width?)
|
||||
:ref check-menu-offscreen}
|
||||
(when-let [parent-option (:parent-option level)]
|
||||
[:*
|
||||
[:li.context-menu-item
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue