storybook/docs/snippets/vue/button-story-click-handler.vue2.js.mdx
2021-02-23 00:26:03 +00:00

20 lines
344 B
Plaintext

```js
// Button.stories.js
import { action } from '@storybook/addon-actions';
import Button from 'Button.vue';
export default {
component: Button,
title: 'Button',
};
export const Text = () => ({
components: { Button },
template: '<Button label="Hello" @click="onClick" />',
methods: {
onClick: action('clicked'),
},
});
```