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.
 
 
 
 

18 lines
605 B

  1. import './miniteaser.scss';
  2. import {createElement} from "../../_global/scripts/helpers";
  3. export const createMiniTeaser = ({
  4. type = 'single-topic',
  5. title = 'Hallo Welt',
  6. link = '#',
  7. icon = 'Eule Doktorhut',
  8. }) => {
  9. const tile = createElement(type === 'single-topic' ? 'a' : 'div', ['tile', 'topic-teaser', 'mini-teaser', type], null);
  10. tile.href = link;
  11. createElement('div', ['icon-box', 'pictogram-' + icon.toLowerCase().split(' ').join('-')], null, tile);
  12. const textBox = createElement('div', ['text-box'], null, tile);
  13. createElement('h4', ['title'], title, textBox);
  14. return tile;
  15. }