storybook/docs/snippets/html/button-story-with-blue-args.ts.mdx

28 lines
694 B
Plaintext

```ts
// Button.stories.ts
import { Meta, StoryFn } from '@storybook/html';
import { createButton, ButtonArgs } from './Button';
export default {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/html/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
//👇 Creates specific parameters for the story
parameters: {
backgrounds: {
values: [
{ name: 'red', value: '#f00' },
{ name: 'green', value: '#0f0' },
{ name: 'blue', value: '#00f' },
],
},
},
} as Meta<ButtonArgs>;
export const Primary: StoryFn<ButtonArgs> = (args) => createButton(args);
```