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]: next/link className props is not available in storybook #19918

Closed
yagiz-noonlight opened this issue Nov 21, 2022 · 3 comments
Closed

[Bug]: next/link className props is not available in storybook #19918

yagiz-noonlight opened this issue Nov 21, 2022 · 3 comments

Comments

@yagiz-noonlight
Copy link

Describe the bug

Using next/link component with className results in empty className in storybook, but works correctly in Next.js 13

To Reproduce

- Create a next.js project with storybook.
- Add a component that uses next/link
- Add className property to next/link component.
- Visit storybook (the component does not have any class)

System

Environment Info:

  System:
    OS: macOS 12.6.1
    CPU: (10) arm64 Apple M1 Max
  Binaries:
    Node: 19.0.1 - /opt/homebrew/bin/node
    npm: 8.19.2 - /opt/homebrew/bin/npm
  Browsers:
    Chrome: 107.0.5304.110
    Safari: 16.1
  npmPackages:
    @storybook/addon-actions: ^6.5.13 => 6.5.13
    @storybook/addon-essentials: ^6.5.13 => 6.5.13
    @storybook/addon-interactions: ^6.5.13 => 6.5.13
    @storybook/addon-links: ^6.5.13 => 6.5.13
    @storybook/addon-postcss: ^2.0.0 => 2.0.0
    @storybook/builder-webpack5: ^6.5.13 => 6.5.13
    @storybook/manager-webpack5: ^6.5.13 => 6.5.13
    @storybook/react: ^6.5.13 => 6.5.13
    @storybook/testing-library: ^0.0.13 => 0.0.13

Additional context

No response

@doougui
Copy link

doougui commented Nov 22, 2022

The same thing happened to me. Even inline styles are not being applied for some reason.

image
image

@doougui
Copy link

doougui commented Nov 22, 2022

Seems like this is related to this issue: #19813.

@valentinpalkovic
Copy link
Contributor

https://github.com/storybookjs/storybook/releases/tag/v7.0.0-alpha.52 was released, which contains the PR #19834 that fixes this issue. Upgrade today to the @next NPM tag to try it out!

npx sb upgrade --prerelease

Closing this issue. Please re-open if you think there's still more to do.

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

3 participants