-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
prop={Component}
breaks "show code" view
#16995
Labels
Comments
It seems that the bug lies in a dependency package. |
Still reproduces with Storybook 7.0.6. |
prop={Component}
breaks "show code" view
This also seems to be an issue when the component is wrapped in a React Memo, for example using an Icon from @mui/icons-material results in:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Passing a (nontrivial) component as a prop causes the source code view to be overly verbose.
For example, modifying the react-ts example as follows:
Expected "show code" output:
Actual "show code" output:
To Reproduce
cd examples/react-ts && yarn && yarn storybook
http://localhost:9011/?path=/docs/examples-emoji-button--with-args
System
Environment Info:
System:
OS: macOS 11.6
CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
Binaries:
Node: 16.13.0 - /usr/local/bin/node
Yarn: 3.0.0-git.20210727.hash-3cbbb672 - /usr/local/bin/yarn
npm: 8.1.0 - /usr/local/bin/npm
Browsers:
Chrome: 96.0.4664.93
Safari: 14.1.2
npmPackages:
@storybook/addon-essentials: 6.5.0-alpha.3 => 6.5.0-alpha.3
@storybook/addon-storyshots: 6.5.0-alpha.3 => 6.5.0-alpha.3
@storybook/addon-storysource: 6.5.0-alpha.3 => 6.5.0-alpha.3
@storybook/cli: 6.5.0-alpha.3 => 6.5.0-alpha.3
@storybook/components: 6.5.0-alpha.3 => 6.5.0-alpha.3
@storybook/react: 6.5.0-alpha.3 => 6.5.0-alpha.3
@storybook/theming: 6.5.0-alpha.3 => 6.5.0-alpha.3
The text was updated successfully, but these errors were encountered: