storybook/docs/snippets/react/button-story-click-handler-args.js.mdx
2020-10-07 12:23:34 +08:00

9 lines
184 B
Plaintext

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