Skip to content
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

onMouseDown passthrough in ActionMenu and AnchoredOverlay #1217

Merged
merged 9 commits into from
May 10, 2021

Conversation

VanAnderson
Copy link
Contributor

This PR provides a passthrough for onMouseDown events in ActionMenu to AnchoredOverlay

Also fills out some doc comments I realized were missing in ActionMenu

@changeset-bot
Copy link

changeset-bot bot commented May 10, 2021

🦋 Changeset detected

Latest commit: 608a874

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/components Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented May 10, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/primer/primer-components/66KPbA67cAK1KYtgp8WicY6ejUjw
✅ Preview: https://primer-compone-git-vananderson-onmousedown-action-menu-p-5d9a73.vercel.app

@vercel vercel bot temporarily deployed to Preview May 10, 2021 19:19 Inactive
@vercel vercel bot temporarily deployed to Preview May 10, 2021 19:23 Inactive
/**
* A callback that occurs when a user presses a mouse button over an element.
*/
onMouseDown?: (event: React.MouseEvent) => unknown
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would match the ActionMenu and use onOverlayMouseDown here since we still technically have a split between anchor and Overlay in this component

@vercel vercel bot temporarily deployed to Preview May 10, 2021 19:37 Inactive
@VanAnderson
Copy link
Contributor Author

ack, forgot to remove onMouseDown from anchored overlay, fixed in fc19bd3

@vercel vercel bot temporarily deployed to Preview May 10, 2021 19:39 Inactive
@vercel vercel bot temporarily deployed to Preview May 10, 2021 19:45 Inactive
Copy link
Member

@dgreif dgreif left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, I think this will save us a lot of headaches down the road!

@vercel vercel bot temporarily deployed to Preview May 10, 2021 19:50 Inactive
@vercel vercel bot temporarily deployed to Preview May 10, 2021 19:53 Inactive
@VanAnderson VanAnderson merged commit ff9ce6f into main May 10, 2021
@VanAnderson VanAnderson deleted the VanAnderson/onMouseDown-action-menu-prop branch May 10, 2021 19:56
@github-actions github-actions bot mentioned this pull request May 10, 2021
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.

3 participants