mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 11:11:53 +08:00
24 lines
699 B
Plaintext
24 lines
699 B
Plaintext
```ts
|
|
// Button.stories.ts|tsx
|
|
|
|
import { Button as ButtonComponent } from './Button';
|
|
|
|
// Replace your-framework with the name of your framework
|
|
import type { Meta, Storybook } from '@storybook/your-framework';
|
|
|
|
const meta: Meta<typeof ButtonComponent> = {
|
|
/* 👇 The title prop is optional.
|
|
* See https://storybook.js.org/docs/7.0/react/configure/overview#configure-story-loading
|
|
* to learn how to generate automatic titles
|
|
*/
|
|
title: 'Design System/Atoms/Button',
|
|
component: ButtonComponent,
|
|
};
|
|
|
|
export default meta;
|
|
type Story = StoryObj<typeof ButtonComponent>;
|
|
|
|
// This is the only named export in the file, and it matches the component name
|
|
export const Button: Story = {};
|
|
```
|