-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
feat(theme-classic): allow passing tab label and default value through TabItem #5442
Conversation
Signed-off-by: Josh-Cena <[email protected]>
Signed-off-by: Josh-Cena <[email protected]>
✔️ [V2] 🔨 Explore the source changes: 061f8d5 🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/612cb852ea12c1000741200d 😎 Browse the preview: https://deploy-preview-5442--docusaurus-2.netlify.app |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-5442--docusaurus-2.netlify.app/ |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-5442--docusaurus-2.netlify.app/ |
✔️ [V2] 🔨 Explore the source changes: 4d125dd 🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/612f5403d27cb70007168874 😎 Browse the preview: https://deploy-preview-5442--docusaurus-2.netlify.app |
Signed-off-by: Josh-Cena <[email protected]>
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 👍
Just polished/simplified a bit the doc
IMHO it could be useful to provide a way to use Tabs without value
. If TabItem labels are distinct (generally the case) they can be used as TabItem values too, making usage even simpler
You can already use tabs without |
As you can see there's still some syntactic noise when you declare labels in the |
I think we could support both, one will be a fallback to the other and you can provide only one of those. But it's not a big deal, this PR is fine to merge now thanks |
Motivation
Resolve #5441
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
Preview: https://deploy-preview-5442--docusaurus-2.netlify.app/docs/next/markdown-features/tabs/