mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 11:11:53 +08:00
41 lines
755 B
Plaintext
41 lines
755 B
Plaintext
```ts
|
|
// Button.stories.ts|tsx
|
|
|
|
// Replace your-framework with the name of your framework
|
|
import type { Meta, StoryObj } from '@storybook/your-framework';
|
|
|
|
import { Button } from './Button';
|
|
|
|
/**
|
|
* # Button stories
|
|
* These stories showcase the button
|
|
*/
|
|
const meta: Meta<typeof Button> = {
|
|
component: Button
|
|
parameters: {
|
|
docs: {
|
|
description: {
|
|
component: 'Another description, overriding the comments'
|
|
},
|
|
},
|
|
},
|
|
};
|
|
|
|
export default meta;
|
|
type Story = StoryObj<typeof Button>;
|
|
|
|
/**
|
|
* # Primary Button
|
|
* This is the primary button
|
|
*/
|
|
export const Primary: Story = {
|
|
parameters: {
|
|
docs: {
|
|
description: {
|
|
story: 'Another description on the story, overriding the comments'
|
|
},
|
|
},
|
|
},
|
|
};
|
|
```
|