Skip to content

[Bug] subcomponent JSDocs & props are replaced by the parent's JSDocs & props #216

@humphreyja

Description

@humphreyja

Describe the bug

When using subcomponents (example: <SegmentedControl.Button>), the documentation in the manifest will completely replace any props or JSDocs you may have for the subcomponents with the docs & props for the parent component.

Steps to reproduce the behavior

  1. Add a tsx component <Parent> with JSDocs and props.
  2. Add a child tsx component <Child> with JSDocs and props.
  3. Assign the child to the parent as a subcomponent. Parent.Child = Child.
  4. View the result http://localhost:8080/manifests/components.html#filter-all. Child will show the parent's docs.

Expected behavior

The child's props and JSDoc should be used instead of being overwritten by the parent's props and JSDoc.

Screenshots and/or logs

Here's a screenshot from a library I am building.
Image

Environment

  • OS: MacOS
  • Node.js version: 22.21.0
  • NPM version: Latest
  • Browser (if applicable): Safari
  • Storybook Version: 10.3.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions