mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-09 00:19:13 +08:00
52 lines
1.5 KiB
Plaintext
52 lines
1.5 KiB
Plaintext
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
exports[`docs-mdx-compiler-plugin component-id.mdx 1`] = `
|
|
"/* @jsxRuntime classic */
|
|
/* @jsx mdx */
|
|
import { assertIsFn, AddContext } from '@storybook/addon-docs';
|
|
|
|
import { Button } from '@storybook/react/demo';
|
|
import { Story, Meta } from '@storybook/addon-docs';
|
|
|
|
const layoutProps = {};
|
|
const MDXLayout = 'wrapper';
|
|
function MDXContent({ components, ...props }) {
|
|
return (
|
|
<MDXLayout {...layoutProps} {...props} components={components} mdxType=\\"MDXLayout\\">
|
|
<Meta title=\\"Button\\" component={Button} id=\\"button-id\\" mdxType=\\"Meta\\" />
|
|
<Story name=\\"component notes\\" mdxType=\\"Story\\">
|
|
<Button mdxType=\\"Button\\">Component notes</Button>
|
|
</Story>
|
|
</MDXLayout>
|
|
);
|
|
}
|
|
|
|
MDXContent.isMDXComponent = true;
|
|
|
|
export const componentNotes = () => <Button>Component notes</Button>;
|
|
componentNotes.storyName = 'component notes';
|
|
componentNotes.parameters = { storySource: { source: '<Button>Component notes</Button>' } };
|
|
|
|
const componentMeta = {
|
|
title: 'Button',
|
|
id: 'button-id',
|
|
component: Button,
|
|
includeStories: ['componentNotes'],
|
|
};
|
|
|
|
const mdxStoryNameToKey = { 'component notes': 'componentNotes' };
|
|
|
|
componentMeta.parameters = componentMeta.parameters || {};
|
|
componentMeta.parameters.docs = {
|
|
...(componentMeta.parameters.docs || {}),
|
|
page: () => (
|
|
<AddContext mdxStoryNameToKey={mdxStoryNameToKey} mdxComponentAnnotations={componentMeta}>
|
|
<MDXContent />
|
|
</AddContext>
|
|
),
|
|
};
|
|
|
|
export default componentMeta;
|
|
"
|
|
`;
|