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

14 lines
241 B
Plaintext

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