storybook/docs/snippets/web-components/button-story-using-args.ts.mdx
2023-09-08 22:25:40 +01:00

34 lines
500 B
Plaintext

```ts
// Button.stories.ts
import type { Meta, StoryObj } from '@storybook/web-components';
const meta: Meta = {
component: 'demo-button',
};
export default meta;
type Story = StoryObj;
export const Primary: Story = {
args: {
background: '#ff0',
label: 'Button',
},
};
export const Secondary: Story = {
args: {
...Primary.args,
label: '😄👍😍💯',
},
};
export const Tertiary: Story = {
args: {
...Primary.args,
label: '📚📕📈🤓',
},
};
```