-
Notifications
You must be signed in to change notification settings - Fork 526
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
Composable ActionMenu draft #1619
Conversation
size-limit report 📦
|
🦋 Changeset detectedLatest commit: 6f0712d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
| open | `boolean` | - | Optional. If defined, will control the open/closed state of the overlay. Must be used in conjuction with `onOpenChange`. | | ||
| onOpenChange | `(open: boolean) => void` | - | Optional. If defined, will control the open/closed state of the overlay. Must be used in conjuction with `open`. | | ||
| anchorRef | `React.RefObject<HTMLElement>` | - | Optional. Useful for defining an external anchor | | ||
| overlayProps | [`Partial<OverlayProps>`](/Overlay#component-props) | - | Optional. Props to be spread on the internal [`AnchoredOverlay`](/AnchoredOverlay) component. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if we had an ActionMenu.Overlay
component instead of exposing overlayProps
? IMO that feels a little more aligned with the general direction of the ActionList API.
We do something similar for Autocomplete: https://primer.style/react/Autocomplete
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes!! That's something I wanted feedback on! I'm glad there's already precedence 💯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can I introduce that in a different PR, the types need some untangling for that and I'd like to get it reviewed on it's own
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup. Sounds good 👍
Co-authored-by: Cole Bemis <colebemis@github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ship it 🚢
* wip * add memex example * add complex story * add changeset * add actionmenu2 to drafts * add docs! * polish the docs just a bit * move MenuContext + add warning * return null from selection * polish stories * fix story * remove draft from status * oops left a comment in * change setOpen to onOpenChange * Use Box instead of BorderBox in docs * missed role in bad merge! * remove component checklist import Co-authored-by: Cole Bemis <colebemis@github.com> Co-authored-by: Cole Bemis <colebemis@github.com>
Docs | Storybook
Closes #448
checklist:
Will create another PR after this for feedback:
ActionMenu.Overlay
instead of overlayProps object