mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 02:01:48 +08:00
29 lines
647 B
Plaintext
29 lines
647 B
Plaintext
```ts
|
|
// MyComponent.stories.ts
|
|
|
|
import type { Meta, StoryObj } from '@storybook/angular/';
|
|
|
|
import { withDesign } from 'storybook-addon-designs';
|
|
|
|
import { MyComponent } from './MyComponent.component';
|
|
|
|
// More on default export: https://storybook.js.org/docs/7.0/angular/writing-stories/introduction#default-export
|
|
const meta: Meta<MyComponent> = {
|
|
title: 'FigmaExample',
|
|
component: MyComponent,
|
|
decorators: [withDesign],
|
|
};
|
|
|
|
export default meta;
|
|
type Story = StoryObj<MyComponent>;
|
|
|
|
export const Example: Story = {
|
|
parameters: {
|
|
design: {
|
|
type: 'figma',
|
|
url: 'https://www.figma.com/file/Sample-File',
|
|
},
|
|
},
|
|
};
|
|
```
|