Merge pull request #9940 from storybookjs/add/stories-for-layout-mdx

ADD stories for layout in mdx as example and regression test
This commit is contained in:
Norbert de Langen 2020-02-26 13:55:27 +01:00 committed by GitHub
commit 92f9e23263
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,25 @@
import { Button } from '@storybook/react/demo';
<Meta
title="Core/Layout MDX"
component={Button}
id="core-layout-mdx"
decorators={[storyFn => <div style={{ backgroundColor: 'yellow' }}>{storyFn()}</div>]}
/>
# Selected
<Preview>
<Story name="defaultValue">
<Button>Hello world</Button>
</Story>
<Story name="padded" parameters={{ layout: 'padded' }}>
<Button>Hello world</Button>
</Story>
<Story name="fullscreen" parameters={{ layout: 'fullscreen' }}>
<Button>Hello world</Button>
</Story>
<Story name="centered" parameters={{ layout: 'centered' }}>
<Button>Hello world</Button>
</Story>
</Preview>