Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 

26 lignes
971 B

  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. const tile = createElement('div', ['tile', 'mini-teaser', type], null);
  13. tile.href = link;
  14. const textBox = createElement('div', ['text-box'], null, tile);
  15. if (type === 'standard') {
  16. createElement('h5', ['category'], category, textBox);
  17. }else{
  18. createElement('div', ['icon-box', 'pictogram-' + icon.toLowerCase().split(' ').join('-')], null, textBox);
  19. }
  20. createElement('h4', ['title'], title, textBox);
  21. if (type === 'infoteaser') {
  22. textBox.appendChild(createButton({color: 'white', label: buttonlabel, iconPosition: 'icon-right', icon: null}))
  23. }
  24. return tile;
  25. }