mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 03:11:49 +08:00
24 lines
380 B
Plaintext
24 lines
380 B
Plaintext
```js
|
|
// Button.stories.js
|
|
|
|
import Button from './Button.vue';
|
|
|
|
import { action } from '@storybook/addon-actions';
|
|
|
|
export default {
|
|
component: Button,
|
|
};
|
|
|
|
export const Text = {
|
|
render: () => ({
|
|
components: { Button },
|
|
template: '<Button label="Hello" @click="onClick" />',
|
|
setup() {
|
|
return {
|
|
onClick: action('clicked'),
|
|
};
|
|
},
|
|
}),
|
|
};
|
|
```
|