storybook/docs/snippets/common/api-doc-block-description-example.ts.mdx
2023-05-25 21:44:48 +01:00

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'
},
},
},
};
```