mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 02:11:49 +08:00
24 lines
331 B
Plaintext
24 lines
331 B
Plaintext
```js
|
|
// Button.stories.js | Button.stories.jsx | Button.stories.ts | Button.stories.tsx
|
|
|
|
import Button from './Button';
|
|
|
|
export default {
|
|
component: Button,
|
|
};
|
|
|
|
export const Primary = {
|
|
args: {
|
|
primary: true,
|
|
label: 'Button',
|
|
},
|
|
};
|
|
|
|
const Secondary = {
|
|
args: {
|
|
...Primary.args,
|
|
primary: false,
|
|
},
|
|
};
|
|
```
|