-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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]: Typescript argType inference is not working #21801
Comments
@kasperpeulen any idea what's going on here? |
I think it might be related to #15334. |
@shilman This is docgen issue right? The TS type is correct, but the controls don't show the variants. My guess is that it is similar to the problems @ethriel3695 had with MUI. I would need to heavily debug react-docgen-typescript to get a clue what is going on in those cases. |
Same issue here. Works well in Storybook 6, but broken after migrating to version 7. |
Might be a regression in react-docgen-typescript or something @shilman ? |
I also don't get any automatic argType inference with Edit: Managed to have them show up for some components, no Idea what caused that, will report once I have a clue... Edit2: Seems as if most of my issues stem from the component file exporting more then one component or use other fancy import/export schemes. |
Yee-haw!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.1.0-alpha.1 containing PR #22024 that references this issue. Upgrade today to the
|
Great Caesar's ghost!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.0.3 containing PR #22024 that references this issue. Upgrade today to the
|
I'm still getting this issue. I have a Better year, even if I try to overrides this, it isn't applying. It is string no matter what I do - even if I explicitly defined |
Same here and the bug still makes argType inference unusable. Is there any way we could get this working please? |
In my case, I just needed to set the correct const config = {
stories: ['../app/**/*.stories.@(js|jsx|mjs|ts|tsx)', '../app/**/stories.ts', '../app/**/*.mdx'],
addons: [
'@storybook/addon-onboarding',
'@storybook/addon-essentials',
'@chromatic-com/storybook',
'@storybook/addon-interactions',
],
typescript: {
reactDocgen: 'react-docgen-typescript',
},
framework: {
name: '@storybook/nextjs',
options: {},
},
staticDirs: ['../public'],
}; |
Describe the bug
Bug: Storybook does not infer typescript types.
I'm using class-variance-authority in a similar way as shown in this Next.js showcase.
To Reproduce
Github: https://github.com/AdisonCavani/storybook-arg-types-bug
Published: https://stackblitz.com/github/AdisonCavani/storybook-arg-types-bug
System
Additional context
No response
The text was updated successfully, but these errors were encountered: