Skip to content

Commit

Permalink
Merge pull request #33 from storybookjs/mdx-to-stories-mdx
Browse files Browse the repository at this point in the history
Replace `'mdx'` tag with `'stories-mdx'`
  • Loading branch information
shilman authored Dec 30, 2022
2 parents 32d5c6e + ab2d92c commit a19f4e1
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 29 deletions.
56 changes: 28 additions & 28 deletions src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe('mdx2', () => {
};
const componentMeta = {
title: 'foobar',
tags: ['mdx'],
tags: ['stories-mdx'],
includeStories: ['foo'],
};
componentMeta.parameters = componentMeta.parameters || {};
Expand Down Expand Up @@ -141,7 +141,7 @@ describe('full snapshots', () => {
};
const componentMeta = {
title: 'foobar',
tags: ['mdx'],
tags: ['stories-mdx'],
includeStories: ["foo"]
};
componentMeta.parameters = componentMeta.parameters || {};
Expand Down Expand Up @@ -218,7 +218,7 @@ describe('full snapshots', () => {
};
const componentMeta = {
title: 'foobar',
tags: ['mdx'],
tags: ['stories-mdx'],
includeStories: ["foo"]
};
componentMeta.parameters = componentMeta.parameters || {};
Expand Down Expand Up @@ -301,7 +301,7 @@ describe('full snapshots', () => {
};
const componentMeta = {
title: 'MDX/Badge',
tags: ['mdx'],
tags: ['stories-mdx'],
includeStories: ["foo"]
};
componentMeta.parameters = componentMeta.parameters || {};
Expand Down Expand Up @@ -397,7 +397,7 @@ describe('docs-mdx-compiler-plugin', () => {
name: 'B',
},
},
tags: ['mdx'],
tags: ['stories-mdx'],
includeStories: ['componentNotes'],
};
componentMeta.parameters = componentMeta.parameters || {};
Expand Down Expand Up @@ -433,7 +433,7 @@ describe('docs-mdx-compiler-plugin', () => {
title: 'Button',
id: 'button-id',
component: Button,
tags: ['mdx'],
tags: ['stories-mdx'],
includeStories: ['componentNotes'],
};
componentMeta.parameters = componentMeta.parameters || {};
Expand Down Expand Up @@ -469,7 +469,7 @@ describe('docs-mdx-compiler-plugin', () => {
_Foo_.storyName = 'renamed';
const componentMeta = {
title: 'MDX/CSF imports',
tags: ['mdx'],
tags: ['stories-mdx'],
includeStories: ['_Basic_', '_Other_', '_Foo_'],
};
componentMeta.parameters = componentMeta.parameters || {};
Expand Down Expand Up @@ -524,7 +524,7 @@ describe('docs-mdx-compiler-plugin', () => {
children: storyFn(),
}),
],
tags: ['mdx'],
tags: ['stories-mdx'],
includeStories: ['one'],
};
componentMeta.parameters = componentMeta.parameters || {};
Expand Down Expand Up @@ -553,7 +553,7 @@ describe('docs-mdx-compiler-plugin', () => {
};
const componentMeta = {
title: 'docs-only',
tags: ['mdx'],
tags: ['stories-mdx'],
includeStories: ['__page'],
};
componentMeta.parameters = componentMeta.parameters || {};
Expand Down Expand Up @@ -599,7 +599,7 @@ describe('docs-mdx-compiler-plugin', () => {
foo: 1,
}),
],
tags: ['mdx'],
tags: ['stories-mdx'],
includeStories: ['one'],
};
componentMeta.parameters = componentMeta.parameters || {};
Expand All @@ -624,7 +624,7 @@ describe('docs-mdx-compiler-plugin', () => {
};
const componentMeta = {
title: "Addons/Docs/what's in a title?",
tags: ['mdx'],
tags: ['stories-mdx'],
includeStories: ['__page'],
};
componentMeta.parameters = componentMeta.parameters || {};
Expand Down Expand Up @@ -676,7 +676,7 @@ describe('docs-mdx-compiler-plugin', () => {
};
const componentMeta = {
title: 'Button',
tags: ['mdx'],
tags: ['stories-mdx'],
includeStories: ['one', 'helloStory'],
};
componentMeta.parameters = componentMeta.parameters || {};
Expand Down Expand Up @@ -731,7 +731,7 @@ describe('docs-mdx-compiler-plugin', () => {
notes: 'component notes',
},
component: Button,
tags: ['mdx'],
tags: ['stories-mdx'],
includeStories: ['componentNotes', 'storyNotes'],
};
componentMeta.parameters = componentMeta.parameters || {};
Expand Down Expand Up @@ -796,7 +796,7 @@ describe('docs-mdx-compiler-plugin', () => {
notes: 'component notes',
},
component: Button,
tags: ['mdx'],
tags: ['stories-mdx'],
includeStories: ['helloButton', 'two'],
};
componentMeta.parameters = componentMeta.parameters || {};
Expand Down Expand Up @@ -847,7 +847,7 @@ describe('docs-mdx-compiler-plugin', () => {
};
const componentMeta = {
title: 'Button',
tags: ['mdx'],
tags: ['stories-mdx'],
includeStories: ['componentNotes'],
};
componentMeta.parameters = componentMeta.parameters || {};
Expand Down Expand Up @@ -896,7 +896,7 @@ describe('docs-mdx-compiler-plugin', () => {
};
const componentMeta = {
title: 'Text',
tags: ['mdx'],
tags: ['stories-mdx'],
includeStories: ['text'],
};
componentMeta.parameters = componentMeta.parameters || {};
Expand Down Expand Up @@ -974,7 +974,7 @@ describe('docs-mdx-compiler-plugin', () => {
};
const componentMeta = {
title: 'Button',
tags: ['mdx'],
tags: ['stories-mdx'],
includeStories: ['one', 'helloStory', 'wPunctuation', '_1FineDay'],
};
componentMeta.parameters = componentMeta.parameters || {};
Expand Down Expand Up @@ -1008,7 +1008,7 @@ describe('docs-mdx-compiler-plugin', () => {
};
const componentMeta = {
title: 'story-function-var',
tags: ['mdx'],
tags: ['stories-mdx'],
includeStories: ['basic'],
};
componentMeta.parameters = componentMeta.parameters || {};
Expand Down Expand Up @@ -1087,7 +1087,7 @@ describe('docs-mdx-compiler-plugin', () => {
};
const componentMeta = {
title: 'Multiple',
tags: ['mdx'],
tags: ['stories-mdx'],
includeStories: ['multipleChildren'],
};
componentMeta.parameters = componentMeta.parameters || {};
Expand Down Expand Up @@ -1138,7 +1138,7 @@ describe('docs-mdx-compiler-plugin', () => {
};
const componentMeta = {
title: 'MDX|Welcome',
tags: ['mdx'],
tags: ['stories-mdx'],
includeStories: ['toStorybook'],
};
componentMeta.parameters = componentMeta.parameters || {};
Expand Down Expand Up @@ -1186,7 +1186,7 @@ describe('docs-mdx-compiler-plugin', () => {
};
const componentMeta = {
title: \`\${titleFunction('template')}\`,
tags: ['mdx'],
tags: ['stories-mdx'],
includeStories: ['__page'],
};
componentMeta.parameters = componentMeta.parameters || {};
Expand Down Expand Up @@ -1253,7 +1253,7 @@ describe('docs-mdx-compiler-plugin', () => {
docsOnly: true,
};
const componentMeta = {
tags: ['mdx'],
tags: ['stories-mdx'],
includeStories: ['__page'],
};
componentMeta.parameters = componentMeta.parameters || {};
Expand Down Expand Up @@ -1287,7 +1287,7 @@ describe('docs-mdx-compiler-plugin', () => {
};
const componentMeta = {
component: Button,
tags: ['mdx'],
tags: ['stories-mdx'],
includeStories: ['basic'],
};
componentMeta.parameters = componentMeta.parameters || {};
Expand Down Expand Up @@ -1317,7 +1317,7 @@ describe('docs-mdx-compiler-plugin', () => {
const componentMeta = {
title: 'Button',
component: Button,
tags: ['mdx'],
tags: ['stories-mdx'],
includeStories: ['basic'],
};
componentMeta.parameters = componentMeta.parameters || {};
Expand Down Expand Up @@ -1348,7 +1348,7 @@ describe('docs-mdx-compiler-plugin', () => {
title: 'Button',
component: Button,
render: (args) => /*#__PURE__*/ _jsx(Button, { ...args }),
tags: ['mdx'],
tags: ['stories-mdx'],
includeStories: ['basic'],
};
componentMeta.parameters = componentMeta.parameters || {};
Expand Down Expand Up @@ -1381,7 +1381,7 @@ describe('docs-mdx-compiler-plugin', () => {
const componentMeta = {
title: 'Button',
component: Button,
tags: ['mdx'],
tags: ['stories-mdx'],
includeStories: ['basic'],
};
componentMeta.parameters = componentMeta.parameters || {};
Expand Down Expand Up @@ -1414,7 +1414,7 @@ describe('docs-mdx-compiler-plugin', () => {
const componentMeta = {
title: 'Button',
component: Button,
tags: ['mdx'],
tags: ['stories-mdx'],
includeStories: ['basic'],
};
componentMeta.parameters = componentMeta.parameters || {};
Expand Down Expand Up @@ -1460,7 +1460,7 @@ describe('docs-mdx-compiler-plugin', () => {
};
const componentMeta = {
title: 'Example/Introduction',
tags: ['mdx'],
tags: ['stories-mdx'],
includeStories: ['__page'],
};
componentMeta.parameters = componentMeta.parameters || {};
Expand Down
2 changes: 1 addition & 1 deletion src/sb-mdx-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ export function genMeta(ast: t.JSXElement, options: CompilerOptions) {
args,
argTypes,
render,
tags: "['mdx']",
tags: "['stories-mdx']",
};
}

Expand Down

0 comments on commit a19f4e1

Please sign in to comment.