mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 07:01:53 +08:00
34 lines
500 B
Plaintext
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: '📚📕📈🤓',
|
|
},
|
|
};
|
|
```
|