Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 

51 rader
1.2 KiB

  1. import {createInfobox} from "./InfoboxComponent";
  2. export default {
  3. title: 'Components/Infobox',
  4. argTypes: {
  5. type: {
  6. name: 'Box-Stil',
  7. control: {type: 'select'},
  8. options: ['regular', 'success', 'warning', 'error'],
  9. defaultValue: 'regular',
  10. },
  11. content: {
  12. name: 'Inhalt (HTML)',
  13. control: {type: 'text'},
  14. defaultValue: '<p><strong>Infobox: </strong>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Adipisci deserunt non quam rem, quae in <a href="#">porro sint veritatis</a> hic, quas dignissimos debitis sequi repudiandae ipsum dolorem placeat harum blanditiis. Vero.</p>'
  15. }
  16. }
  17. }
  18. const Template = ({...args}) => {
  19. return createInfobox({...args});
  20. };
  21. export const Infobox = Template.bind({});
  22. Infobox.args = {};
  23. export const Full = Template.bind({});
  24. Full.args = {
  25. full: true,
  26. };
  27. export const Secondary = Template.bind({});
  28. Secondary.args = {
  29. type: 'secondary',
  30. full: true,
  31. };
  32. export const Warning = Template.bind({});
  33. Warning.args = {
  34. type: 'warning',
  35. };
  36. export const Error = Template.bind({});
  37. Error.args = {
  38. type: 'error',
  39. };
  40. export const Success = Template.bind({});
  41. Success.args = {
  42. type: 'success',
  43. };