-
-
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
Code preview in addon-docs only works for arrow functions in CSF #8401
Comments
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
Huzzah!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.3.0-beta.20 containing PR #9092 that references this issue. Upgrade today to try it out! You can find this prerelease on the |
Describe the bug
The docs panel doesn't seem to display a code preview when using a regular old
function
in Component Story Format (CSF). Instead, "No code available" is displayed. Looks like it only works for arrow functions.Not a huge deal of course, can work around it by just using arrows instead :)
To Reproduce
Here's a new story in a cra-kitchen-sink fork that demonstrates the issue.
Expected behavior
I'd have expected arrows and regular functions to be interchangeable in CSF.
Screenshots
Code snippets
System:
The text was updated successfully, but these errors were encountered: