This PR throws a descriptive error when the of prop on Meta or Story is found, as that is not supported in .stories.mdx files
How to test
Add a file to a sandbox like this:
import { Story, Meta } from '@storybook/blocks';
import * as ButtonStories from './Button.stories';
import { Button } from './Button';
<Meta title="storiesMdx" component={Button}/>
<Story of={ButtonStories.Primary} />
or
import { Story, Meta } from '@storybook/blocks';
import * as ButtonStories from './Button.stories';
import { Button } from './Button';
<Meta title="storiesMdx" of={ButtonStories} />
<Story story={ButtonStories.Primary} />
Change Type
[ ] maintenance
[ ] documentation
[x] patch
[ ] minor
[ ] major
📦 Published PR as canary version: 0.0.5--canary.21.beb53e0.0
:sparkles: Test out this PR locally via:
```bash
npm install @storybook/mdx1-csf@0.0.5--canary.21.beb53e0.0
# or
yarn add @storybook/mdx1-csf@0.0.5--canary.21.beb53e0.0
```
Version
Published prerelease version: v1.0.0-next.2
Changelog
#### 💥 Breaking Change
- Update to 7.0 / mdx2-csf structure [#19](https://github.com/storybookjs/mdx1-csf/pull/19) ([@shilman](https://github.com/shilman))
#### 🐛 Bug Fix
- Throw descriptive error when 'of' prop is detected [#21](https://github.com/storybookjs/mdx1-csf/pull/21) ([@JReinhold](https://github.com/JReinhold))
- Move mdx import out of loader into compile [#20](https://github.com/storybookjs/mdx1-csf/pull/20) ([@shilman](https://github.com/shilman))
- ReDoS attack patch [#17](https://github.com/storybookjs/mdx1-csf/pull/17) ([@iarmbears](https://github.com/iarmbears))
#### Authors: 3
- [@iarmbears](https://github.com/iarmbears)
- Jeppe Reinhold ([@JReinhold](https://github.com/JReinhold))
- Michael Shilman ([@shilman](https://github.com/shilman))
Works on https://github.com/storybookjs/storybook/issues/20496
Mirror PR for MDX2: https://github.com/storybookjs/mdx2-csf/pull/37
What Changed
This PR throws a descriptive error when the
of
prop onMeta
orStory
is found, as that is not supported in.stories.mdx
filesHow to test
Add a file to a sandbox like this:
or
Change Type
maintenance
documentation
patch
minor
major
📦 Published PR as canary version:
0.0.5--canary.21.beb53e0.0
:sparkles: Test out this PR locally via: ```bash npm install @storybook/mdx1-csf@0.0.5--canary.21.beb53e0.0 # or yarn add @storybook/mdx1-csf@0.0.5--canary.21.beb53e0.0 ```
Version
Published prerelease version:
v1.0.0-next.2
Changelog
#### 💥 Breaking Change - Update to 7.0 / mdx2-csf structure [#19](https://github.com/storybookjs/mdx1-csf/pull/19) ([@shilman](https://github.com/shilman)) #### 🐛 Bug Fix - Throw descriptive error when 'of' prop is detected [#21](https://github.com/storybookjs/mdx1-csf/pull/21) ([@JReinhold](https://github.com/JReinhold)) - Move mdx import out of loader into compile [#20](https://github.com/storybookjs/mdx1-csf/pull/20) ([@shilman](https://github.com/shilman)) - ReDoS attack patch [#17](https://github.com/storybookjs/mdx1-csf/pull/17) ([@iarmbears](https://github.com/iarmbears)) #### Authors: 3 - [@iarmbears](https://github.com/iarmbears) - Jeppe Reinhold ([@JReinhold](https://github.com/JReinhold)) - Michael Shilman ([@shilman](https://github.com/shilman))