fbredius/storybook

View on GitHub
docs/snippets/vue/storybook-preview-with-mixin-decorator.3-mixin.js.mdx

Summary

Maintainability
Test Coverage
```js
// .storybook/preview.js

import { app } from '@storybook/vue3';

//👇 Storybook Vue app being extended and registering the mixin
app.mixin({
  // Your mixin code
});

export const decorators = [
  (story) => ({
    components: { story },
    template: '<div style="margin: 3em;"><story /></div>',
  }),
];
```