mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-20 05:02:37 +08:00
docs: storybook-preview-global-decorator
This commit is contained in:
parent
dd174ea82c
commit
a648786202
@ -0,0 +1,5 @@
|
||||
// .storybook/preview.js
|
||||
|
||||
```js
|
||||
export const decorators = [() => '<div style="margin: 3em;"><story /></div>'];
|
||||
```
|
@ -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',
|
||||
]}
|
||||
/>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user