// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`docs-mdx-compiler-plugin loaders.mdx 1`] = `
"/* @jsx mdx */
import { assertIsFn, AddContext } from '@storybook/addon-docs/blocks';

import { Button } from '@storybook/react/demo';
import { Story, Meta } from '@storybook/addon-docs/blocks';

const makeShortcode = (name) =>
  function MDXDefaultShortcode(props) {
    console.warn(
      'Component ' +
        name +
        ' was not imported, exported, or provided by MDXProvider as global scope'
    );
    return <div {...props} />;
  };

const layoutProps = {};
const MDXLayout = 'wrapper';
function MDXContent({ components, ...props }) {
  return (
    <MDXLayout {...layoutProps} {...props} components={components} mdxType=\\"MDXLayout\\">
      <Meta
        title=\\"Button\\"
        loaders={[
          async () => ({
            foo: 1,
          }),
        ]}
        mdxType=\\"Meta\\"
      />
      <h1>{\`Story with loader\`}</h1>
      <Story
        name=\\"one\\"
        loaders={[
          async () => ({
            bar: 2,
          }),
        ]}
        mdxType=\\"Story\\"
      >
        <Button mdxType=\\"Button\\">One</Button>
      </Story>
    </MDXLayout>
  );
}

MDXContent.isMDXComponent = true;

export const one = () => <Button>One</Button>;
one.storyName = 'one';
one.parameters = { storySource: { source: '<Button>One</Button>' } };
one.loaders = [
  async () => ({
    bar: 2,
  }),
];

const componentMeta = {
  title: 'Button',
  loaders: [
    async () => ({
      foo: 1,
    }),
  ],
  includeStories: ['one'],
};

const mdxStoryNameToKey = { one: 'one' };

componentMeta.parameters = componentMeta.parameters || {};
componentMeta.parameters.docs = {
  ...(componentMeta.parameters.docs || {}),
  page: () => (
    <AddContext mdxStoryNameToKey={mdxStoryNameToKey} mdxComponentMeta={componentMeta}>
      <MDXContent />
    </AddContext>
  ),
};

export default componentMeta;
"
`;
