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.
 
 
 
 

40 rivejä
1.1 KiB

  1. import './commonContent.scss';
  2. import {createElement} from "../../_global/scripts/helpers";
  3. import {createButton} from "../../atoms/button/ButtonComponent";
  4. export const createCommonContent = ({
  5. text = "Möchten Sie, dass zusätzliche regionale Inhalte Ihrer IHK zum Thema auf dieser Seite eingeblendet werden?",
  6. noCta = {
  7. label: 'Nein danke',
  8. link: '#',
  9. target: '_self',
  10. },
  11. yesCta = {
  12. label: 'Ja gerne',
  13. link: '#',
  14. target: '_self',
  15. }
  16. }) => {
  17. const common = createElement('div', ['common-content']);
  18. const p = createElement('p', [], text, common);
  19. const buttons = createElement('div', ['buttons'], null, common);
  20. buttons.appendChild(createButton({
  21. label: noCta.label,
  22. link: noCta.link,
  23. color: 'primary-light',
  24. size: 'small',
  25. icon: 'schliessen',
  26. iconPosition: 'icon-right'
  27. }));
  28. buttons.appendChild(createButton({
  29. label: yesCta.label,
  30. link: yesCta.link,
  31. color: 'secondary',
  32. size: 'small',
  33. icon: 'check',
  34. iconPosition: 'icon-right'
  35. }));
  36. return common;
  37. }