storybook 6 actions don't work

Created on 2 Nov 2020  路  4Comments  路  Source: nuxt-community/storybook

with Storybook 6, actions are configured out of the box and a story like so

template: '<MyComponent @click.native="onClick" v-bind="$props" />'

will work (Storybook created the onClick for us automatically using the actions regex in .storybook/preview.js

but with nuxt-storybook the actions don't work, I get a 'onClick is not a function'

tried to define the actions regex, tried to eject and set up the preview.js , but nothing works.
I think this should work out of the box as it does in vanilla storybook

question

All 4 comments

Hey @gabimor,
Could you provide a sample on codesandbox for vanilla storybook?

I think this should work out of the box as it does in vanilla storybook

If it does in storybook then we should definitly support it too 馃憤

@farnabaz It looks like I've submitted a question that might be closely related. I've added a sandbox link.

https://github.com/nuxt-community/storybook/issues/171

@gabimor take a look at #171, does it solves your issue?

@farnabaz Yeah the actions work now, thanks!

Was this page helpful?
0 / 5 - 0 ratings