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

How to use the ArgsTable with the Live Example Code? #3

Open
damianfabian opened this issue Apr 20, 2022 · 0 comments
Open

How to use the ArgsTable with the Live Example Code? #3

damianfabian opened this issue Apr 20, 2022 · 0 comments

Comments

@damianfabian
Copy link

I tried passing parameters as an object, tried using Canvas component but got "Canvas is not defined", and the documentation is not really clear on how to make it work, below a snippet of my code:

const Template = (args) => (
  <div>
      <pre>{JSON.stringify(args)}</pre>
      <pre>{JSON.stringify(parameters)}</pre>
      <p>
        <Button {...args} />
      </p>
  </div>
);

export const Primary = Template.bind({});
Primary.args = {
  label: 'Button',
  primary: true
}
Primary.parameters = {
  label: 'Button',
  primary: true
}

is it even possible to link the ArgsTable with the sample code?

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

1 participant