Next.js template
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Button.stories.jsx 980B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import React from 'react';
  2. import { Button } from './Button';
  3. // More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
  4. export default {
  5. title: 'Example/Button',
  6. component: Button,
  7. // More on argTypes: https://storybook.js.org/docs/react/api/argtypes
  8. argTypes: {
  9. backgroundColor: { control: 'color' },
  10. },
  11. };
  12. // More on component templates: https://storybook.js.org/docs/react/writing-stories/introduction#using-args
  13. const Template = (args) => <Button {...args} />;
  14. export const Primary = Template.bind({});
  15. // More on args: https://storybook.js.org/docs/react/writing-stories/args
  16. Primary.args = {
  17. primary: true,
  18. label: 'Button',
  19. };
  20. export const Secondary = Template.bind({});
  21. Secondary.args = {
  22. label: 'Button',
  23. };
  24. export const Large = Template.bind({});
  25. Large.args = {
  26. size: 'large',
  27. label: 'Button',
  28. };
  29. export const Small = Template.bind({});
  30. Small.args = {
  31. size: 'small',
  32. label: 'Button',
  33. };