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

21 строка
863 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. title = 'Hallo Welt',
  7. link = '#',
  8. icon = 'Eule Doktorhut',
  9. buttonlabel = 'mehr erfahren',
  10. }) => {
  11. const tile = createElement('div', ['tile', 'topic-teaser', 'mini-teaser', type === 'infobanner' ? 'infob' :'standard', type], null);
  12. tile.href = link;
  13. createElement('div', ['icon-box', 'pictogram-' + icon.toLowerCase().split(' ').join('-')], null, tile);
  14. const textBox = createElement('div', ['text-box'], null, tile);
  15. createElement('h4', ['title'], title, textBox);
  16. if (type === 'infobanner') {
  17. textBox.appendChild(createButton({color: 'white', label: buttonlabel, iconPosition: 'icon-right', icon: null}))
  18. }
  19. return tile;
  20. }