Storybook Docs 6.1.1 not able to set components to MDXProvider as global scope
See original GitHub issueDescribe the bug
After upgrading from 6.0.25
Storybook Docs no longer recognizes components passed to MDXProvider as global scope. It was working with the following in preview.js:
export const parameters = {
docs: {
inlineStories: true,
theme: theme,
components: {
SomeComponent: SomeComponent,
},
},
};
Has the way to configure this changed in 6.1
?
To Reproduce Steps to reproduce the behavior:
- Update
preview.js
with a similar config to set SomeComponent with global scope - In component mdx docs use SomeComponent
- Notice warning
Component SomeComponent was not imported, exported, or provided by MDXProvider as global scope
Expected behavior SomeComponent is available to use in mdx docs on a global level.
Screenshots If applicable, add screenshots to help explain your problem.
Code snippets If applicable, add code samples to help explain your problem.
System
Environment Info:
System:
OS: macOS 10.15.7
CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
Binaries:
Node: 14.15.1 - ~/.nvm/versions/node/v14.15.1/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.14.8 - ~/.nvm/versions/node/v14.15.1/bin/npm
Browsers:
Chrome: 87.0.4280.88
Edge: 87.0.664.60
Firefox: 84.0
Safari: 14.0.2
npmPackages:
@storybook/addon-a11y: ^6.1.1 => 6.1.1
@storybook/addon-actions: ^6.1.1 => 6.1.1
@storybook/addon-controls: ^6.1.1 => 6.1.1
@storybook/addon-docs: ^6.1.1 => 6.1.1
@storybook/addon-storysource: ^6.1.1 => 6.1.1
@storybook/addon-viewport: ^6.1.1 => 6.1.1
@storybook/addons: ^6.1.1 => 6.1.1
@storybook/react: ^6.1.1 => 6.1.1
@storybook/source-loader: ^6.1.1 => 6.1.1
@storybook/theming: ^6.1.1 => 6.1.1
@storybook/web-components: ^6.1.1 => 6.1.1
Additional context Add any other context about the problem here.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top Results From Across the Web
MDX - Storybook
Storybook is a frontend workshop for building UI components and pages in isolation. Thousands of teams use it for UI development, testing, and...
Read more >MDX and Decorator with Storybook 6.1+ - lit html
All I want is when from the toolbar, a global value is set, I want to set that value on the root of...
Read more >Documenting design systems with Storybook Docs
Storybook is a playground for UI development. It's a great tool to help designers, project managers, and developers understand and visualize ...
Read more >Administrator Guide - SAP Help Portal
Using SAP Enterprise Portal iViews to view Analysis documents. ... If not, the setup installs this component automatically.
Read more >[Solved]-MDX - Storybook + React + Typescript-Reactjs
... MDXDefaultShortcode(props) { console.warn("Component " + name + " was not imported, exported, or provided by MDXProvider as global scope") return <div ...
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 FreeTop 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
Top GitHub Comments
That’s great! Closing then… 😅
@shilman I do not as it is a private project. I did update to
6.2.0-beta.1
and things are working as expected again 😄