Open
Description
Describe the bug
I'm pretty new to Storybook, so I don't know if this is the right place, but would really like my Svelte custom events to be shown here:
Steps to reproduce the behavior
- Clone my repo here
- Start storybook with
npm run storybook
- Go to button story and click on the button.
Expected behavior
Both click event and custom svelte event.
Screenshots and/or logs
It only shows the click event.
Button.stories.svelte
<script context="module">
import Button from "./Button.svelte";
import { withActions } from '@storybook/addon-actions/decorator';
export const meta = {
title: 'Buttons',
tags: ['autodocs'],
component: Button,
args: {
size: 'medium',
label: 'test-story'
},
parameters: {
actions: {
handles: ['custom', 'click'],
},
},
decorators: [withActions],
};
</script>
<script lang="ts">
import { Story } from '@storybook/addon-svelte-csf';
</script>
<Story name="Primary" let:args>
<Button {...args} on:click={args.onClick} />
</Story>
Environment
Storybook Environment Info:
System:
OS: macOS 14.3
CPU: (10) arm64 Apple M1 Max
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.17.1 - ~/.nvm/versions/node/v18.17.1/bin/node
npm: 10.2.5 - ~/.nvm/versions/node/v18.17.1/bin/npm <----- active
pnpm: 8.12.0 - ~/.nvm/versions/node/v18.17.1/bin/pnpm
Browsers:
Chrome: 121.0.6167.85
Safari: 17.3
npmPackages:
@storybook/addon-actions: ^7.6.12 => 7.6.12
@storybook/addon-essentials: ^7.6.12 => 7.6.12
@storybook/addon-interactions: ^7.6.12 => 7.6.12
@storybook/addon-links: ^7.6.12 => 7.6.12
@storybook/addon-svelte-csf: ^4.1.1 => 4.1.1
@storybook/blocks: ^7.6.12 => 7.6.12
@storybook/svelte: ^7.6.12 => 7.6.12
@storybook/sveltekit: ^7.6.12 => 7.6.12
@storybook/test: ^7.6.12 => 7.6.12
eslint-plugin-storybook: ^0.6.15 => 0.6.15
storybook: ^7.6.12 => 7.6.12
Additional context
Check repo for details here:
https://github.com/21RISK/svelte-storybook-events