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

13 lines
264 B
Plaintext

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