import NextLink from "next/link" import Chip from "@scandic-hotels/design-system/Chip" import Image from "@scandic-hotels/design-system/Image" import { Typography } from "@scandic-hotels/design-system/Typography" import styles from "./contentCard.module.css" import type { ImageVaultAsset } from "@scandic-hotels/common/utils/imageVault" interface ContentCardProps { link?: { href: string openInNewTab?: boolean isExternal?: boolean } heading: string image: ImageVaultAsset bodyText: string promoText?: string className?: string } export default function ContentCard({ heading, image, bodyText, promoText, className = "", link, }: ContentCardProps) { const card = (
{image.meta.alt {promoText ? ( {promoText} ) : null}

{heading}

{bodyText}

) if (!link) return card const linkProps = { className: styles.link, ...(link.openInNewTab && { target: "_blank", rel: "noopener noreferrer", }), } return ( {card} ) }