Replies: 1 comment 1 reply
-
After about 6 hours of troubleshooting, I finally figured out a workaround. If you add 'asChild' to your tag as a prop, it will stop trying to render the default story as a parent of your snippet. This should be added to the Storybook docs if this is the recommended way to handle these kinds of stories moving forward (unsure). Example:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Before upgrading, this method was working just fine, but after moving to 8.6, Storybook is now trying to render these snippets inside the default story (i.e., wrapping a story in a story) rather than simply allowing for custom stories.
Note: These are all inside Component.stories.svelte files with the following boilerplate:
Examples:
Additional information
I'm not really doing anything special in my main.ts or preview.ts, just using light/dark themes instead of backgrounds (setting the background with the imported _storybook.scss file which is working fine). We are using SvelteKit and Vite in this project, but nothing fancy there either. Again though, this was all working previously.
Create a reproduction
No response
Beta Was this translation helpful? Give feedback.
All reactions