-
Notifications
You must be signed in to change notification settings - Fork 610
SelectPanel: Add example of inactiveText
usage
#6134
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
|
size-limit report 📦
|
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 a new Storybook example demonstrating how to use the inactiveText
prop in SelectPanel
.
- Introduces a new
Items
type with an optionalinactiveText
field - Creates
itemsWithInactive
, an array extending the base items to include one inactive item - Adds the
WithInactiveItems
story to showcase theinactiveText
usage
Comments suppressed due to low confidence (2)
packages/react/src/SelectPanel/SelectPanel.features.stories.tsx:809
- [nitpick] The type name
Items
is plural and generic. Consider renaming it to a singular, descriptive name likeSelectPanelItemWithInactiveText
to more clearly convey its purpose.
type Items = ItemInput & {
packages/react/src/SelectPanel/SelectPanel.features.stories.tsx:819
- There are no existing tests covering the new
inactiveText
prop. Consider adding unit or integration tests to verify that this text is rendered correctly inSelectPanel
when items are inactive.
inactiveText: 'Currently inactive due to an outage',
Context: https://github.com/github/primer/issues/5220
Adds example of
inactiveText
usage inSelectPanel
Changelog
Changed
inactive
usage inSelectPanel
Rollout strategy
Testing & Reviewing
Merge checklist