diff --git a/gfi-ihk-2024/stories/components/mini-teaser/MiniTeaserComponent.js b/gfi-ihk-2024/stories/components/mini-teaser/MiniTeaserComponent.js index 70cd288..c949172 100644 --- a/gfi-ihk-2024/stories/components/mini-teaser/MiniTeaserComponent.js +++ b/gfi-ihk-2024/stories/components/mini-teaser/MiniTeaserComponent.js @@ -19,7 +19,8 @@ export const createMiniTeaser = ({ createElement('h4', ['title'], title, textBox); return tile; }else{ - const tile = createElement('div', ['tile', 'mini-teaser', type], null); + const tile = createElement('a', ['tile', 'mini-teaser', type], null); + tile.href = link; if (backgroundImage && backgroundImage.length > 0) { tile.style = 'background-image: url(' + backgroundImage + ');'; tile.classList.add('background-image'); @@ -28,10 +29,10 @@ export const createMiniTeaser = ({ if (icon && icon.length > 0) { createElement('div', ['icon-box', 'pictogram-' + icon.toLowerCase().split(' ').join('-')], null, textBox); createElement('h4', ['title'], title, textBox); - textBox.appendChild(createButton({color: 'white', label: buttonlabel,link: link, iconPosition: 'icon-right', icon: null})) + textBox.appendChild(createButton({elementType: 'span',color: 'white', label: buttonlabel,iconPosition: 'icon-right', icon: null, preventClick: false})) }else{ createElement('h4', ['title', 'noicon'], title, textBox); - textBox.appendChild(createButton({color: 'white', label: buttonlabel,link: link, iconPosition: 'icon-right', icon: null})) + textBox.appendChild(createButton({elementType: 'span',color: 'white', label: buttonlabel, iconPosition: 'icon-right', icon: null, preventClick: false})) } return tile;