Skip to content

🎨 Adjust types #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 2, 2025
Merged

🎨 Adjust types #7

merged 3 commits into from
Feb 2, 2025

Conversation

totase
Copy link
Owner

@totase totase commented Feb 2, 2025

This pull request includes several enhancements and bug fixes to the ContextMenu, MenuItem, and SubMenu components in the src/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:

  • Added new optional props animateExit and triggerEvent to ContextMenuProps to control the exit animation and the event that triggers the context menu. The default values are true and contextmenu, respectively.
  • Updated the ContextMenu component to use the triggerEvent prop instead of hardcoding the contextmenu event for showing and hiding the context menu. [1] [2]
  • Added an onClick handler to stop event propagation when clicking inside the context menu.

Enhancements to MenuItem component:

  • Added new optional props onClick and disabled to MenuItemProps to handle click events and disable the item. The default value for disabled is false.
  • Updated the MenuItem component to use the disabled prop with a default value of false.

Enhancements to SubMenu component:

  • Extended SubMenuProps to include all properties from MenuItemProps except onClick, and added a new prop label to display the submenu label.

@totase totase merged commit 32c29ff into main Feb 2, 2025
4 checks passed
@totase totase deleted the fix/types branch February 2, 2025 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant