From 6e1caaca9262ada785aaac5c45466db60cc302c7 Mon Sep 17 00:00:00 2001 From: Lukas Zimmer Date: Thu, 14 Mar 2024 16:55:53 +0100 Subject: [PATCH] Infobanner komplett klickbar --- .../stories/components/mini-teaser/MiniTeaserComponent.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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;