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.
 
 
 
 

41 regels
946 B

  1. import {createGlobalMessage} from "./GlobalMessageComponent";
  2. export default {
  3. title: 'Components/Global Message',
  4. parameters: {
  5. layout: 'fullscreen',
  6. },
  7. argTypes: {
  8. type: {
  9. name: 'Typ',
  10. control: 'select',
  11. options: ['light', 'bold', 'alarming'],
  12. defaultValue: 'light',
  13. },
  14. message: {
  15. name: 'Nachricht',
  16. control: {type: 'text'},
  17. defaultValue: 'Leider kommt es durch <a href="#">technische Wartungsmaßnahmen</a> am 2. Mai in der Zeit von 17:30–23:00 zu einer eingeschränkten Verfügbarkeit unserer Internetseite',
  18. },
  19. }
  20. }
  21. const Template = ({...args}) => {
  22. return createGlobalMessage({...args});
  23. };
  24. export const SubtleMessage = Template.bind({});
  25. SubtleMessage.args = {
  26. type: 'light',
  27. };
  28. export const BoldMessage = Template.bind({});
  29. BoldMessage.args = {
  30. type: 'bold',
  31. };
  32. export const AlarmMessage = Template.bind({});
  33. AlarmMessage.args = {
  34. type: 'alarming',
  35. };