storybook/docs/snippets/solid/component-story-figma-integration.ts.mdx
2023-02-21 19:12:42 -05:00

29 lines
652 B
Plaintext

```tsx
// MyComponent.stories.ts|tsx
import type { Meta, StoryObj } from 'storybook-solidjs';
import { withDesign } from 'storybook-addon-designs';
import { MyComponent } from './MyComponent';
// More on default export: https://storybook.js.org/docs/7.0/react/writing-stories/introduction#default-export
const meta: Meta<typeof MyComponent> = {
title: 'FigmaExample',
component: MyComponent,
decorators: [withDesign],
};
export default meta;
type Story = StoryObj<typeof MyComponent>;
export const Example: Story = {
parameters: {
design: {
type: 'figma',
url: 'https://www.figma.com/file/Sample-File',
},
},
};
```