storybook/docs/snippets/angular/component-story-figma-integration.ts.mdx
2022-06-21 21:04:31 +02:00

29 lines
740 B
Plaintext

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