mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 15:52:19 +08:00
- Rename `introduction.md`, `overview.md`, `how-to-contribute.md` pages -> `index.md` pages - Add all-new `index.md` pages for Sharing and API - Find/replace `introduction.md`/`overview.md` -> `index.md` - Find/replace `/introduction`/`/overview` -> `/` - Add `hideRendererSelector: true` to frontmatter of (some) pages that aren't conditional on renderer
25 lines
522 B
Plaintext
25 lines
522 B
Plaintext
```ts
|
|
// MyComponent.stories.ts|tsx
|
|
|
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
|
|
import { MyComponent } from './MyComponent';
|
|
|
|
// More on default export: https://storybook.js.org/docs/writing-stories/#default-export
|
|
const meta = {
|
|
component: MyComponent,
|
|
} satisfies Meta<typeof MyComponent>;
|
|
|
|
export default meta;
|
|
type Story = StoryObj<typeof meta>;
|
|
|
|
export const Example: Story = {
|
|
parameters: {
|
|
design: {
|
|
type: 'figma',
|
|
url: 'https://www.figma.com/file/Sample-File',
|
|
},
|
|
},
|
|
};
|
|
```
|