feat: Make button-dropdown renderItem available for all systems#4453
Merged
gethinwebster merged 5 commits intomainfrom Apr 22, 2026
Merged
feat: Make button-dropdown renderItem available for all systems#4453gethinwebster merged 5 commits intomainfrom
gethinwebster merged 5 commits intomainfrom
Conversation
9a1cbcc to
184fdea
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4453 +/- ##
=======================================
Coverage 97.40% 97.40%
=======================================
Files 933 933
Lines 29417 29417
Branches 10665 10664 -1
=======================================
Hits 28653 28653
- Misses 716 757 +41
+ Partials 48 7 -41 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Remove the @awsuiSystem core restriction from the renderItem prop so that it is available across all Cloudscape systems, not just Core. This enables consumers on any system to use renderItem for custom item rendering, such as adding italicized '- New' labels following the announcing new features pattern. Relates-to: AWSUI-61530
…ddingHorizontal tokens Add two new public design tokens for dropdown option item padding: - spaceOptionPaddingVertical (resolves to spaceXxs / 4px) - spaceOptionPaddingHorizontal (resolves to spaceL / 20px) These tokens allow consumers using renderItem to match the default item padding when providing custom content, enabling patterns like the 'announcing new features' italic New label. Updated button-dropdown item-element styles to use the new tokens via the SCSS constants instead of hardcoded awsui.$space-l. Relates-to: AWSUI-61530
ea2c878 to
f1e3c7a
Compare
jperals
approved these changes
Apr 22, 2026
|
|
||
| // Use for options in dropdowns | ||
| $option-padding-vertical: awsui.$space-xxs; | ||
| $option-padding-vertical: awsui.$space-option-padding-vertical; |
Member
There was a problem hiding this comment.
Nit: since there are now design tokens for these, these two SCSS variables are not really needed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Expose the
renderItemprop in all systems.Also add some new public design tokens that can be used to style custom dropdown item content to match default items.
Related links, issue #, if available: AWSUI-61530
How has this been tested?
Functionality already tested; added new design tokens to dev page.
Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
CONTRIBUTING.md.CONTRIBUTING.md.Security
checkSafeUrlfunction.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.