storybook/docs/snippets/web-components/component-story-custom-params.ts.mdx
2023-01-16 20:19:05 +01:00

30 lines
515 B
Plaintext

```ts
// Button.stories.ts
import type { Meta, StoryObj } from '@storybook/web-components';
const meta: Meta = {
title: 'Button',
component: 'demo-button',
};
export default meta;
type Story = StoryObj<typeof Button>;
export const Primary: Story = {
args: {
primary: true,
label: 'Button',
},
parameters: {
backgrounds: {
values: [
{ name: 'red', value: '#f00' },
{ name: 'green', value: '#0f0' },
{ name: 'blue', value: '#00f' },
],
},
},
};
```