mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 03:11:49 +08:00
23 lines
353 B
Plaintext
23 lines
353 B
Plaintext
```js
|
|
// Button.stories.js
|
|
|
|
import Button from './Button.vue';
|
|
|
|
export default {
|
|
component: Button,
|
|
};
|
|
|
|
export const Text = {
|
|
render: ({ label }) => ({
|
|
components: { Button },
|
|
setup() {
|
|
return {
|
|
label,
|
|
onClick: action('clicked'),
|
|
};
|
|
},
|
|
template: '<Button :label="label" @click="onClick" />',
|
|
}),
|
|
};
|
|
```
|