Skip to content
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

[Bug]: Vue components with intersection type props don't have "Props" panel in docs #30045

Open
gVguy opened this issue Dec 12, 2024 · 0 comments

Comments

@gVguy
Copy link

gVguy commented Dec 12, 2024

Describe the bug

Using intersection types for for Vue component props fails to display "Props" section with controls in docs as if the component didn't have any props at all.

Reproduction link

https://stackblitz.com/edit/github-jnqruegb?file=src%2Fstories%2FExampleFails.stories.ts,src%2Fstories%2FExampleWorks.stories.ts,src%2Fstories%2Ftypes.ts,src%2Fstories%2FExampleFails.vue,src%2Fstories%2FExampleWorks.vue&preset=node

Reproduction steps

  1. Use reproduction link
  2. Check the "Example intersection ❌" docs page (files: ExampleFails.stories.ts, ExampleFails.vue, types.ts)
  3. Note there isn't a "Props" section although the component has props defined by intersection type
  4. Check the "Example NO intersection ✅" docs page (files: ExampleWorks.stories.ts, ExampleWorks.vue, types.ts)
  5. Note there is a "Props" section this time as this component's props are defined as a single type without intersection

System

Storybook Environment Info:

  System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.20.3 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm <----- active
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    @storybook/addon-essentials: ^8.5.0-alpha.20 => 8.5.0-alpha.20 
    @storybook/addon-interactions: ^8.5.0-alpha.20 => 8.5.0-alpha.20 
    @storybook/addon-onboarding: ^8.5.0-alpha.20 => 8.5.0-alpha.20 
    @storybook/blocks: ^8.5.0-alpha.20 => 8.5.0-alpha.20 
    @storybook/test: ^8.5.0-alpha.20 => 8.5.0-alpha.20 
    @storybook/vue3: ^8.5.0-alpha.20 => 8.5.0-alpha.20 
    @storybook/vue3-vite: ^8.5.0-alpha.20 => 8.5.0-alpha.20 
    storybook: ^8.5.0-alpha.20 => 8.5.0-alpha.20

Additional context

No response

@gVguy gVguy changed the title [Bug]: Vue components with intersection type props don't [Bug]: Vue components with intersection type props don't have "Props" panel in docs Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant