storybook/docs/snippets/react/button-story-click-handler-args.js.mdx
2021-06-28 23:00:33 +01:00

9 lines
246 B
Plaintext

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