Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 

31 строка
1.1 KiB

  1. import './miniteaser.scss';
  2. import {createElement} from "../../_global/scripts/helpers";
  3. import { createButton } from '../../atoms/button/ButtonComponent';
  4. export const createMiniTeaser = ({
  5. type = 'standard',
  6. category = 'IHK Mitgliedschaft',
  7. title = 'Werden Sie Teil unseres Netzwerks!',
  8. link = '#',
  9. icon = 'Roboter',
  10. buttonlabel = 'IHK-Newsletter sichern',
  11. }) => {
  12. if (type === 'standard') {
  13. const tile = createElement('a', ['tile', 'mini-teaser', type], null);
  14. tile.href = link;
  15. const textBox = createElement('div', ['text-box'], null, tile);
  16. createElement('h5', ['category'], category, textBox);
  17. createElement('h4', ['title'], title, textBox);
  18. return tile;
  19. }else{
  20. const tile = createElement('div', ['tile', 'mini-teaser', type], null);
  21. const textBox = createElement('div', ['text-box'], null, tile);
  22. createElement('div', ['icon-box', 'pictogram-' + icon.toLowerCase().split(' ').join('-')], null, textBox);
  23. createElement('h4', ['title'], title, textBox);
  24. textBox.appendChild(createButton({color: 'white', label: buttonlabel,link: link, iconPosition: 'icon-right', icon: null}))
  25. return tile;
  26. }
  27. }