docs: storybook-preview-global-decorator

This commit is contained in:
andrekisi 2020-09-15 23:41:49 +02:00
parent dd174ea82c
commit a648786202
2 changed files with 7 additions and 0 deletions

View File

@ -0,0 +1,5 @@
// .storybook/preview.js
```js
export const decorators = [() => '<div style="margin: 3em;"><story /></div>'];
```

View File

@ -80,6 +80,7 @@ To define a decorator for all stories of a component, use the `decorators` key o
paths={[
'react/button-story-component-decorator.js.mdx',
'react/button-story-component-decorator.ts.mdx',
'vue/button-story-component-decorator.js.mdx',
]}
/>
@ -95,6 +96,7 @@ We can also set a decorator for **all stories** via the `decorators` export of y
paths={[
'react/storybook-preview-global-decorator.js.mdx',
'react/storybook-preview-global-decorator.ts.mdx',
'vue/storybook-preview-global-decorator.js.mdx',
]}
/>