|
- import './miniteaser.scss';
- import {createElement} from "../../_global/scripts/helpers";
-
- export const createMiniTeaser = ({
- type = 'single-topic',
- title = 'Hallo Welt',
- link = '#',
- icon = 'Eule Doktorhut',
- }) => {
- const tile = createElement(type === 'single-topic' ? 'a' : 'div', ['tile', 'topic-teaser', 'mini-teaser', type], null);
- tile.href = link;
- createElement('div', ['icon-box', 'pictogram-' + icon.toLowerCase().split(' ').join('-')], null, tile);
- const textBox = createElement('div', ['text-box'], null, tile);
- createElement('h4', ['title'], title, textBox);
-
-
- return tile;
- }
|