storybook/docs/snippets/vue/button-story-click-handler-args.vue3.js.mdx
2021-02-23 19:10:28 +00:00

17 lines
285 B
Plaintext

```js
// Button.stories.js
export const Text = (args) => ({
components: { Button },
setup() {
return {
label: args.label,
onClick: action('clicked'),
};
},
template: '<Button @onClick="onClick" :label="label" />',
});
Text.args = {
label: 'Hello',
};
```