storybook/docs/snippets/web-components/button-story-click-handler-simplificated.ts.mdx
2022-12-23 18:48:39 +00:00

24 lines
431 B
Plaintext

```ts
// Button.stories.ts
import type { Meta, StoryObj } from '@storybook/web-components';
import type { ButtonProps } from './Button';
import { Button } from './Button';
const meta: Meta<ButtonProps> = {
title: 'Button',
render: (args) => Button(args),
argTypes: {
onClick: { action: 'onClick' },
},
};
export default meta;
type Story = StoryObj<ButtonProps>;
export const Text: Story = {
args:{...},
};
```