mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 09:02:24 +08:00
34 lines
586 B
Plaintext
34 lines
586 B
Plaintext
```md
|
|
<!-- MyComponent.stories.mdx -->
|
|
|
|
import { Canvas, Meta, Story } from '@storybook/addon-docs';
|
|
|
|
import { withDesign } from 'storybook-addon-designs';
|
|
|
|
import MyComponent from './MyComponent.svelte';
|
|
|
|
<Meta
|
|
title="FigmaExample"
|
|
component={MyComponent}
|
|
decorators={[withDesign]}
|
|
/>
|
|
|
|
export const Template = () => ({
|
|
props: {},
|
|
Component: MyComponent,
|
|
});
|
|
|
|
<Canvas>
|
|
<Story
|
|
name="Example"
|
|
parameters={{
|
|
design: {
|
|
type: 'figma',
|
|
url: 'https://www.figma.com/file/Sample-File',
|
|
},
|
|
}}
|
|
>
|
|
{Template.bind({})}
|
|
</Story>
|
|
</Canvas>
|
|
``` |