-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Storybook: Add TabbedSidebar stories and improve docs #68118
Storybook: Add TabbedSidebar stories and improve docs #68118
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Hi @t-hamano 👋 I've added Storybook stories for TabbedSidebar and updated its documentation. Would appreciate your review when you have a moment. Thank you! |
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.
Thanks for the PR! I also think the typo fixes and improvements in the README are great.
packages/block-editor/src/components/tabbed-sidebar/stories/index.story.js
Show resolved
Hide resolved
packages/block-editor/src/components/tabbed-sidebar/stories/index.story.js
Outdated
Show resolved
Hide resolved
Thank you for the feedback. I've updated the PR accordingly. |
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.
Thanks for the update! Finally, it's a good idea to make some props controllable:
diff --git a/packages/block-editor/src/components/tabbed-sidebar/stories/index.story.js b/packages/block-editor/src/components/tabbed-sidebar/stories/index.story.js
index ec4621ced7..49825be19b 100644
--- a/packages/block-editor/src/components/tabbed-sidebar/stories/index.story.js
+++ b/packages/block-editor/src/components/tabbed-sidebar/stories/index.story.js
@@ -55,7 +55,7 @@ const meta = {
description: 'The ID of the currently selected tab.',
},
tabs: {
- control: { type: null },
+ control: { type: 'array' },
table: {
type: { summary: 'array' },
},
@@ -63,7 +63,7 @@ const meta = {
'Array of tab objects. Each tab should have: name (string), title (string), panel (React.Node), and optionally panelRef (React.Ref).',
},
closeButtonLabel: {
- control: { type: null },
+ control: { type: 'text' },
table: {
type: { summary: 'string' },
},
Thanks for the feedback! I've updated the PR accordingly. |
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.
LGTM 👍
Part of: #67165
What?
This PR will add stories for TabbedSidebar component in the Storybook.
Testing Instructions
Screenshots or screencast