-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
fix(Menu): fix extra gap issue when the menu doesnt contain any item with icon #18718
base: main
Are you sure you want to change the base?
fix(Menu): fix extra gap issue when the menu doesnt contain any item with icon #18718
Conversation
resolved changes
…nto menuWC_parity
✅ Deploy Preview for carbon-elements ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for v11-carbon-web-components ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for v11-carbon-react ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #18718 +/- ##
==========================================
- Coverage 84.97% 84.34% -0.64%
==========================================
Files 408 408
Lines 14542 14645 +103
Branches 4764 4791 +27
==========================================
- Hits 12357 12352 -5
- Misses 2024 2131 +107
- Partials 161 162 +1 ☔ View full report in Codecov by Sentry. |
Contributes #18338
We have cds menu as parent and menu items as children inside a slot. We need to apply a particular style when none of the items has rendered with an icon. If any of the items is rendered with icon, we need to reserve a blank space for all menu items in that parent menu, otherwise not. Styling from parent does not work as in react.
Here I am dispatching an event from menu item when there is an icon and listened by parent menu and class is added to the parent menu accordingly.
The child items style is then handled using css variables.
Testing / Reviewing
Local storybook