storybook/docs/snippets/vue/component-story-figma-integration.js.mdx
2022-04-27 03:58:45 +01:00

28 lines
696 B
Plaintext

```js
// MyComponent.stories.js
import { withDesign } from 'storybook-addon-designs';
import MyComponent from './MyComponent.vue';
// More on default export: https://storybook.js.org/docs/vue/writing-stories/introduction#default-export
export default {
title: 'FigmaExample',
component: MyComponent,
decorators: [withDesign],
};
// More on component templates: https://storybook.js.org/docs/vue/writing-stories/introduction#using-args
const Template = () => ({
components: { MyComponent },
template: '<MyComponent />',
});
export const Example = Template.bind({});
Example.parameters = {
design: {
type: 'figma',
url: 'https://www.figma.com/file/Sample-File',
},
};
```