storybookjs / storybook

Storybook is the industry standard workshop for building, documenting, and testing UI components in isolation
https://storybook.js.org
MIT License
84.77k stars 9.34k forks source link

[Bug]: Storybook ArgsTypes not extracting component imported types props #29354

Open ardiansah47 opened 1 month ago

ardiansah47 commented 1 month ago

Describe the bug

I have a simple vue button component, and the props type is imported from another type

example component: Image

But why does the storybook props table not extract the ButtonVariant & ButtonSize types? Image

any help, or did I set it up wrong?

Thank you

Reproduction link

https://github.com/ardiansah47/storybook-issue

Reproduction steps

  1. Clone the repository
  2. npm install
  3. npm run storybook

System

Storybook Environment Info:

System: OS: macOS 15.0.1 CPU: (8) arm64 Apple M1 Shell: 5.9 - /bin/zsh Binaries: Node: 20.17.0 - ~/.nvm/versions/node/v20.17.0/bin/node npm: 10.8.2 - ~/.nvm/versions/node/v20.17.0/bin/npm <----- active pnpm: 9.1.4 - /opt/homebrew/bin/pnpm Browsers: Chrome: 129.0.6668.91 Edge: 117.0.2045.55 Safari: 18.0.1 npmPackages: @storybook/addon-essentials: ^8.3.5 => 8.3.5 @storybook/addon-interactions: ^8.3.5 => 8.3.5 @storybook/addon-links: ^8.3.5 => 8.3.5 @storybook/addon-onboarding: ^8.3.5 => 8.3.5 @storybook/blocks: ^8.3.5 => 8.3.5 @storybook/test: ^8.3.5 => 8.3.5 @storybook/vue3: ^8.3.5 => 8.3.5 @storybook/vue3-vite: ^8.3.5 => 8.3.5 storybook: ^8.3.5 => 8.3.5

Additional context

No response

ChristianRaoulis commented 1 month ago

This looks similar to #29340

valentinpalkovic commented 2 days ago

@chakAs3, @kasperpeulen Is the docgen in Vue supposed to "unfold" types to display their "primitive" values, like inferring types from unions and display them in the argtypes panel? I even don't know whether this behaviour is even expected.