feat(SW-272) added mega menu

This commit is contained in:
Erik Tiekstra
2024-09-20 14:27:20 +02:00
parent bb93d488bb
commit 9fcf362587
8 changed files with 307 additions and 58 deletions

View File

@@ -21,24 +21,28 @@ export default function Card({
className,
theme,
backgroundImage,
onPrimaryButtonClick,
onSecondaryButtonClick,
}: CardProps) {
const { buttonTheme, primaryLinkColor, secondaryLinkColor } = getTheme(theme)
return (
<article
className={cardVariants({
className,
theme,
className,
})}
>
{backgroundImage && (
<Image
src={backgroundImage.url}
className={styles.image}
alt={backgroundImage.meta.alt || backgroundImage.title}
width={420}
height={320}
/>
<div className={styles.imageWrapper}>
<Image
src={backgroundImage.url}
className={styles.image}
alt={backgroundImage.meta.alt || backgroundImage.title}
width={backgroundImage.dimensions.width || 420}
height={backgroundImage.dimensions.height || 320}
/>
</div>
)}
<div className={styles.content}>
{scriptedTopTitle ? (
@@ -73,6 +77,7 @@ export default function Card({
href={primaryButton.href}
target={primaryButton.openInNewTab ? "_blank" : undefined}
color={primaryLinkColor}
onClick={onPrimaryButtonClick}
>
{primaryButton.title}
</Link>
@@ -90,6 +95,7 @@ export default function Card({
href={secondaryButton.href}
target={secondaryButton.openInNewTab ? "_blank" : undefined}
color={secondaryLinkColor}
onClick={onSecondaryButtonClick}
>
{secondaryButton.title}
</Link>