storybook/docs/snippets/vue/component-story-figma-integration.mdx.mdx
2022-04-29 20:37:36 +01:00

31 lines
688 B
Plaintext

```md
<!-- MyComponent.stories.mdx -->
import { Canvas, Meta, Story } from '@storybook/addon-docs';
import { withDesign } from 'storybook-addon-designs';
import MyComponent from './MyComponent.vue';
<Meta title="FigmaExample" component={MyComponent} decorators={[withDesign]} />
export const Template = (args) => ({
// Components used in your story `template` are defined in the `components` object
components: { MyComponent },
template: 'MyComponent />',
});
<Canvas>
<Story
name="Example"
parameters={{
design: {
type: 'figma',
url: 'https://www.figma.com/file/Sample-File',
},
}}
>
{Template.bind({})}
</Story>
</Canvas>
```