addon-docs: Failed prop type: Invalid prop `viewMode` of value `docs` supplied to `Preview`, expected one of ["story","info"].
See original GitHub issueDescribe the bug When using addon-docs with MDX, my component in the Canvas tab is shown, but nothing in the Docs tab shows.
To Reproduce
Configure the new Storybook beta with docs-addon
while adding those presets :
module.exports = [
{
name: "@storybook/addon-docs/react/preset",
options: {
configureJSX: true,
sourceLoaderOptions: null,
},
},
];
Versions :
- @storybook/react": “^5.2.0-beta.32”
- @storybook/addon-docs: “^5.2.0-beta.32”,
Screenshots
Story base.story.mdx
:
Config config.js
:
My component shows well in the Canvas tab, however, when I go to the Docs tab, I am having the following errors :
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Docs Addon | Storybook: Frontend workshop for UI development
DocsPage is a zero-config aggregation of your component stories, text descriptions, docgen comments, props tables, and code examples into clean, readable pages.
Read more >How to connect props with Storybook controls - YouTube
Need to learn about Storybook controls in a hurry?Storybook controls make your documentation come to life with auto-generated, ...
Read more >argTypes mapping doesn't work with Vue props #14420
then the Storybook throws in console Invalid prop: type check failed for prop "propToPass". Expected Object, got String with value "prop1". Labels work...
Read more >Storybook - An alternative approach - Paul Scanlon
"canvas" = A single page to display a single story and the addons panel; "docs" = A single page to display multiple stories,...
Read more >Setup CSF + MDX stories with @storybook/addon-docs - GitLab
Over the last few months, Storybook has introduced several new features to make it easier to write rich docs pages for stories:
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@lonyele Yeah those routes were hard-coded in 5.0 due to lack of time. And I think they are hard-coded again in 5.2. But we expect our users to use the same version of our libraries, and don’t make guarantees if they are not. This is not pure semver, but practically speaking it’s worked for us so far aside from this kind of case (e.g. people mixing 5.1 & 5.2 together), which unfortunately happens fairly often.
Oups, sorry for the late answer. We have multiple CRA base config modes.