🎨 Adjust types #7
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several enhancements and bug fixes to the
ContextMenu
,MenuItem
, andSubMenu
components in thesrc/components
directory. The changes primarily focus on improving the flexibility and usability of these components by adding new props and refining existing functionality.Enhancements to
ContextMenu
component:animateExit
andtriggerEvent
toContextMenuProps
to control the exit animation and the event that triggers the context menu. The default values aretrue
andcontextmenu
, respectively.ContextMenu
component to use thetriggerEvent
prop instead of hardcoding thecontextmenu
event for showing and hiding the context menu. [1] [2]onClick
handler to stop event propagation when clicking inside the context menu.Enhancements to
MenuItem
component:onClick
anddisabled
toMenuItemProps
to handle click events and disable the item. The default value fordisabled
isfalse
.MenuItem
component to use thedisabled
prop with a default value offalse
.Enhancements to
SubMenu
component:SubMenuProps
to include all properties fromMenuItemProps
exceptonClick
, and added a new proplabel
to display the submenu label.