mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 06:51:46 +08:00
24 lines
378 B
Plaintext
24 lines
378 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'),
|
|
};
|
|
},
|
|
}),
|
|
};
|
|
```
|