import './miniteaser.scss'; import {createElement} from "../../_global/scripts/helpers"; import { createButton } from '../../atoms/button/ButtonComponent'; export const createMiniTeaser = ({ type = 'standard', category = 'IHK Mitgliedschaft', title = 'Werden Sie Teil unseres Netzwerks!', link = '#', icon = 'Roboter', buttonlabel = 'IHK-Newsletter sichern', }) => { const tile = createElement('div', ['tile', 'mini-teaser', type], null); tile.href = link; const textBox = createElement('div', ['text-box'], null, tile); if (type === 'standard') { createElement('h5', ['category'], category, textBox); }else{ createElement('div', ['icon-box', 'pictogram-' + icon.toLowerCase().split(' ').join('-')], null, textBox); } createElement('h4', ['title'], title, textBox); if (type === 'infoteaser') { textBox.appendChild(createButton({color: 'white', label: buttonlabel, iconPosition: 'icon-right', icon: null})) } return tile; }