mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 11:11:53 +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
26 lines
598 B
Plaintext
26 lines
598 B
Plaintext
```ts
|
|
// FooBar.stories.ts|tsx
|
|
|
|
// Replace your-framework with the name of your framework
|
|
import type { Meta, StoryObj } from '@storybook/your-framework';
|
|
|
|
import { Foo } from './Foo';
|
|
|
|
const meta: Meta<typeof Foo> = {
|
|
/* 👇 The title prop is optional.
|
|
* See https://storybook.js.org/docs/configure/#configure-story-loading
|
|
* to learn how to generate automatic titles
|
|
*/
|
|
title: 'OtherFoo/Bar',
|
|
component: Foo,
|
|
id: 'Foo/Bar', // Or 'foo-bar' if you prefer
|
|
};
|
|
|
|
export default meta;
|
|
type Story = StoryObj<typeof Foo>;
|
|
|
|
export const Baz: Story = {
|
|
name: 'Insert name here',
|
|
};
|
|
```
|