-
Notifications
You must be signed in to change notification settings - Fork 616
Improvement to storybook stories #6114
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
|
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 refines Storybook controls for Banner, IssueLabel, and Label components:
- Switches variant controls from radio to dropdown select for IssueLabel and Label stories
- Adds a new
hideTitle
boolean control to the Banner story
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
packages/react/src/experimental/IssueLabel/IssueLabel.stories.tsx | Changed variant control from inline-radio to select |
packages/react/src/Label/Label.stories.tsx | Updated control type from inline-radio to select |
packages/react/src/Banner/Banner.stories.tsx | Introduced hideTitle boolean control with default |
packages/react/src/experimental/IssueLabel/IssueLabel.stories.tsx
Outdated
Show resolved
Hide resolved
@@ -72,6 +72,10 @@ export const Playground: StoryObj<typeof Banner> = { | |||
control: 'text', | |||
defaultValue: 'Banner title', | |||
}, | |||
hideTitle: { | |||
control: 'boolean', | |||
defaultValue: false, |
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.
To ensure the default value is applied when the story loads, you might move defaultValue: false
into the story's args
(e.g., Playground.args = { hideTitle: false }
) instead of relying solely on argTypes
.
defaultValue: false, |
Copilot uses AI. Check for mistakes.
size-limit report 📦
|
Improving the controls for banner, IssueLabel and Label stories in Storybook.
Changelog
New
Changed
Removed
Rollout strategy
Just a minor tweak to storybook
Testing & Reviewing
Merge checklist