Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actions don't work #19

Open
sidharthramesh opened this issue May 5, 2021 · 1 comment
Open

Actions don't work #19

sidharthramesh opened this issue May 5, 2021 · 1 comment

Comments

@sidharthramesh
Copy link

I have a web component built using lit-element and it emits an event called 'mb-input'. This is my story configuration.

export default {
  title: 'Input',
  component: 'mb-input',
  parameters: { actions: { argTypesRegex: '^mb.*' } },
   argTypes: {
    'mb-input': {action: 'input'},
  },
};

const Template = ({ label = '', textarea = false }) => html`
  <mb-input @mb-input=${console.log} .label=${label} ?textarea=${textarea}>
  </mb-input>
`;

export const Normal = Template.bind({})

Neither the argTypes nor the parameters trigger the action in the panel. The console.log works as expected though.

@demon-tdr
Copy link

Any update on this? I have exactly the same problem.
It shows this message in the console:

withActions(options) is deprecated, please configure addon-actions using the addParameter api:

addParameters({
  actions: {
    handles: options
  },
});

I tried use the addParameter api but it seems it is not available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants