storybook/docs/snippets/vue/button-story-click-handler.3.js.mdx
2021-02-24 17:56:50 +00:00

22 lines
364 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" />',
setup(){
return {
onClick: action('clicked'),
};
},
});
```