Skip to content

Conversation

@Patilpradnesh
Copy link

Summary

This PR improves the error message thrown by the <Tabs> component when a non-<TabItem> child is provided.

The goal is to clarify that wrapper or custom components around <TabItem> are currently not supported by the existing validation logic, which checks the direct React element type.

Changes

  • Improved the <Tabs> child validation error message to mention unsupported wrapper/custom components.
  • Updated the related test snapshot to match the new error message.

Context

This change is motivated by the discussion in the linked issue, where users attempted to wrap <TabItem> in custom components and encountered a confusing error.

I intentionally started with an error-message-only change to avoid modifying core behavior without guidance, and I’m very open to iterating on this approach if relaxing the validation is preferred.

Related Issue

Link :- #11672

@meta-cla
Copy link

meta-cla bot commented Jan 20, 2026

Hi @Patilpradnesh!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@netlify
Copy link

netlify bot commented Jan 20, 2026

[V2]

Built without sensitive environment variables

Name Link
🔨 Latest commit d64f24a
🔍 Latest deploy log https://app.netlify.com/projects/docusaurus-2/deploys/696f896bb3f6c30008368f55
😎 Deploy Preview https://deploy-preview-11676--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@meta-cla
Copy link

meta-cla bot commented Jan 20, 2026

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@meta-cla meta-cla bot added the CLA Signed Signed Facebook CLA label Jan 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Signed Facebook CLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant