Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 

25 linhas
834 B

  1. import './topic-teaser.scss';
  2. import {createElement} from "../../_global/scripts/helpers";
  3. import {createLinkList} from "../linklist/LinkListComponent";
  4. export const createTopicTeaser = ({
  5. type = 'single-topic',
  6. title = 'Hallo Welt',
  7. link = '#',
  8. icon = 'Eule Doktorhut',
  9. linklistData = null,
  10. }) => {
  11. const tile = createElement(type === 'single-topic' ? 'a' : 'div', ['tile', 'topic-teaser', 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 === 'topic-linklist') {
  17. const data = linklistData ? linklistData : {};
  18. const ll = createLinkList(data);
  19. textBox.appendChild(ll);
  20. }
  21. return tile;
  22. }