import Image from "@/components/Image" import Chip from "@/components/TempDesignSystem/Chip" import Link from "@/components/TempDesignSystem/Link" import Body from "@/components/TempDesignSystem/Text/Body" import Subtitle from "@/components/TempDesignSystem/Text/Subtitle" import styles from "./contentCard.module.css" import type { ContentCardLinkProps, ContentCardProps } from "./contentCard" 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 return ( {card} ) } function ContentCardLink({ children, href, openInNewTab, isExternal, }: ContentCardLinkProps) { const Component = isExternal ? "a" : Link const linkProps = { href, ...(openInNewTab && { target: "_blank", rel: "noopener noreferrer", }), } return {children} }