import { withActions, decorate } from '@storybook/addon-actions'; const pickTarget = decorate([args => [args[0].target]]); const button = () => ``; export default { title: 'Addons|Actions', }; export const story1 = () => withActions('click')(button); story1.title = 'Hello World'; export const story2 = () => withActions('click', 'contextmenu')(button); story2.title = 'Multiple actions'; export const story3 = () => withActions('click', 'contextmenu', { clearOnStoryChange: false })(button); story3.title = 'Multiple actions + config'; export const story4 = () => withActions({ click: 'clicked', contextmenu: 'right clicked' })(button); story4.title = 'Multiple actions, object'; export const story5 = () => withActions({ 'click .btn': 'clicked', contextmenu: 'right clicked' })( () => `