mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-05 06:01:22 +08:00
Delete unused story
This commit is contained in:
parent
015fa16ef0
commit
b2f606685b
@ -1,46 +0,0 @@
|
||||
import React from 'react';
|
||||
import { DocsContainer } from '@storybook/addon-docs';
|
||||
import { themes } from '@storybook/theming';
|
||||
import { MDXProvider } from '@mdx-js/react';
|
||||
import { Channel } from '@storybook/channels';
|
||||
|
||||
import markdown from './markdown.stories.mdx';
|
||||
import { defaultComponents } from '../../../../addons/docs/src/DocsRenderer';
|
||||
|
||||
export default {
|
||||
title: 'Addons/Docs/mdx-in-story',
|
||||
parameters: { layout: 'fullscreen' },
|
||||
};
|
||||
|
||||
const context = { channel: new Channel(), componentStories: () => [], storyById: () => ({}) };
|
||||
|
||||
// The purpose of these stories are to document that MDX renders properly in docs itself
|
||||
// As tools like Chromatic cannot capture docs entries, we need to create a story that
|
||||
// actually renders it's own docs, much like the DocsRenderer might.
|
||||
export const Typography = () => {
|
||||
const Docs = markdown.parameters.docs.page;
|
||||
return <Docs />;
|
||||
};
|
||||
|
||||
Typography.decorators = [
|
||||
(storyFn) => (
|
||||
<MDXProvider components={defaultComponents}>
|
||||
<DocsContainer context={context}>{storyFn()}</DocsContainer>
|
||||
</MDXProvider>
|
||||
),
|
||||
];
|
||||
|
||||
export const DarkModeDocs = () => {
|
||||
const Docs = markdown.parameters.docs.page;
|
||||
return <Docs />;
|
||||
};
|
||||
|
||||
DarkModeDocs.decorators = [
|
||||
(storyFn) => (
|
||||
<MDXProvider components={defaultComponents}>
|
||||
<DocsContainer context={context} theme={themes.dark}>
|
||||
{storyFn()}
|
||||
</DocsContainer>
|
||||
</MDXProvider>
|
||||
),
|
||||
];
|
Loading…
x
Reference in New Issue
Block a user