mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 05:31:05 +08:00
13 lines
264 B
Plaintext
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'),
|
|
};
|
|
``` |