-
Notifications
You must be signed in to change notification settings - Fork 72
[LG-5285] feat(split-button): export MenuItem and MenuItemProps #3331
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
Conversation
🦋 Changeset detectedLatest commit: 53211e7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
|
Size Change: +9 B (0%) Total Size: 1.8 MB
ℹ️ View Unchanged
|
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.
Pull request overview
This PR adds re-exports of MenuItem and MenuItemProps from @leafygreen-ui/menu to the @leafygreen-ui/split-button package, allowing consumers to import these components directly from @leafygreen-ui/split-button and eliminating the need for a separate import from @leafygreen-ui/menu.
Key changes:
- Exported
MenuItemandMenuItemPropsfrom the split-button package - Updated documentation to reflect the simplified import pattern
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/split-button/src/index.ts | Added re-exports of MenuItem and MenuItemProps from @leafygreen-ui/menu |
| packages/split-button/README.md | Updated example to show importing MenuItem from split-button instead of menu |
| .changeset/new-points-relate.md | Added changeset documenting the minor version change |
f179282 to
7b54d36
Compare
7b54d36 to
53211e7
Compare
|
Coverage after merging steph/oc-split-button-export-menu-item into main will be
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
✍️ Proposed changes
This change adds re-exports of
MenuItemandMenuItemPropsfrom@leafygreen-ui/menuto the@leafygreen-ui/split-buttonpackage. This resolves cross-dependency issues by allowing consumers to importMenuItemdirectly from@leafygreen-ui/split-buttoninstead of requiring a separate import from@leafygreen-ui/menu.An alternative approach was considered here but hit a limitation with the interaction between compound components and polymorphic: #3330
🎟️ Jira ticket: LG-5285
✅ Checklist
pnpm changesetand documented my changes🧪 How to test changes
MenuItemfrom@leafygreen-ui/split-buttoninstead of@leafygreen-ui/menuMenuItemandMenuItemPropsare properly exported and accessible