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]: Problem with dot-notation subcomponents in meta #30713

Open
fseglard opened this issue Feb 28, 2025 · 0 comments · May be fixed by #30718
Open

[Bug]: Problem with dot-notation subcomponents in meta #30713

fseglard opened this issue Feb 28, 2025 · 0 comments · May be fixed by #30718

Comments

@fseglard
Copy link

Describe the bug

When using dot-notation components and trying to document them with the subcomponents property within the meta object, there is a type error :

Type 'FC<PageTitleProps>' is not assignable to type 'ComponentType<unknown>'.
  Type 'FunctionComponent<PageTitleProps>' is not assignable to type 'FunctionComponent<unknown>'.
    Type 'unknown' is not assignable to type 'PageTitleProps'.(2322)

Therefore, the subcomponents are still displayed in the UI, but without their props.

These issues seem to occur from version v8.5.0.

Reproduction link

https://stackblitz.com/edit/github-bhdi5mrc

Reproduction steps

  1. Go to the reproduction link
  2. Go to the file in src/stories/Page.stories.ts
  3. Checkout the type error in the subcomponents object within the meta object.

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: ^9.0.0-alpha.0 => 9.0.0-alpha.1 
    @storybook/addon-interactions: ^9.0.0-alpha.0 => 9.0.0-alpha.1 
    @storybook/addon-onboarding: ^9.0.0-alpha.0 => 9.0.0-alpha.1 
    @storybook/blocks: ^9.0.0-alpha.0 => 9.0.0-alpha.1 
    @storybook/react: ^9.0.0-alpha.0 => 9.0.0-alpha.1 
    @storybook/react-vite: ^9.0.0-alpha.0 => 9.0.0-alpha.1 
    @storybook/test: ^9.0.0-alpha.0 => 9.0.0-alpha.1 
    storybook: ^9.0.0-alpha.0 => 9.0.0-alpha.1

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants