Button.stories.js 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import { Button } from './Button';
  2. // More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
  3. export default {
  4. title: 'Example/Button',
  5. component: Button,
  6. parameters: {
  7. // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
  8. layout: 'centered',
  9. },
  10. // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
  11. tags: ['autodocs'],
  12. // More on argTypes: https://storybook.js.org/docs/api/argtypes
  13. argTypes: {
  14. backgroundColor: { control: 'color' },
  15. },
  16. };
  17. // More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
  18. export const Primary = {
  19. args: {
  20. primary: true,
  21. label: 'Button',
  22. },
  23. };
  24. export const Secondary = {
  25. args: {
  26. label: 'Button',
  27. },
  28. };
  29. export const Large = {
  30. args: {
  31. size: 'large',
  32. label: 'Button',
  33. },
  34. };
  35. export const Small = {
  36. args: {
  37. size: 'small',
  38. label: 'Button',
  39. },
  40. };