Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 

75 řádky
1.8 KiB

  1. import {createButton} from './ButtonComponent';
  2. export default {
  3. title: 'Atoms/Button',
  4. argTypes: {
  5. label: {
  6. name: 'Button-Text',
  7. control: 'text',
  8. defaultValue: 'Button',
  9. },
  10. size: {
  11. name: 'Größe',
  12. control: {type: 'select'},
  13. options: ['regular', 'small'],
  14. defaultValue: 'regular',
  15. },
  16. color: {
  17. name: 'Farbe',
  18. control: {type: 'select'},
  19. options: ['primary', 'secondary', 'primary-light', 'white'],
  20. defaultValue: 'primary',
  21. },
  22. iconPosition: {
  23. name: 'Icon-Position',
  24. control: {type: 'select'},
  25. options: ['none', 'icon-left', 'icon-right'],
  26. defaultValue: 'none',
  27. },
  28. icon: {
  29. name: 'Icon',
  30. control: {type: 'select'},
  31. options: ['pfeil-rechts', 'pfeil-simple-rechts', 'galerie', 'kalender'],
  32. },
  33. },
  34. };
  35. const Template = ({label, ...args}) => {
  36. return createButton({label, ...args});
  37. };
  38. export const PrimaryButton = Template.bind({});
  39. PrimaryButton.args = {
  40. //primary: true,
  41. };
  42. export const SecondaryButton = Template.bind({});
  43. SecondaryButton.args = {
  44. color: 'secondary',
  45. };
  46. export const GalleryToggle = Template.bind({});
  47. GalleryToggle.args = {
  48. label: 'Galerie öffnen',
  49. iconPosition: 'icon-right',
  50. icon: 'galerie',
  51. };
  52. export const LightArrowButton = Template.bind({});
  53. LightArrowButton.args = {
  54. color: 'primary-light',
  55. label: 'Buttontext',
  56. iconPosition: 'icon-left',
  57. icon: 'pfeil-rechts',
  58. };
  59. export const SmallButton = Template.bind({});
  60. SmallButton.args = {
  61. size: 'small',
  62. };
  63. export const SliderButton = Template.bind({});
  64. SliderButton.args = {
  65. label: '1',
  66. };