import Image from "@/components/Image" import Button from "@/components/TempDesignSystem/Button" import Link from "@/components/TempDesignSystem/Link" import Body from "@/components/TempDesignSystem/Text/Body" import Subtitle from "../Text/Subtitle" import TeaserCardSidepeek from "./Sidepeek" import { teaserCardVariants } from "./variants" import styles from "./teaserCard.module.css" import type { TeaserCardProps } from "@/types/components/teaserCard" export default function TeaserCard({ title, description, primaryButton, secondaryButton, sidePeekButton, sidePeekContent, image, intent, alwaysStack = false, className, }: TeaserCardProps) { const classNames = teaserCardVariants({ intent, alwaysStack, className }) const imageWidth = image && Math.ceil( image.dimensions.aspectRatio >= 1 ? image.dimensions.aspectRatio * 200 : 200 / image.dimensions.aspectRatio ) return (
{image && ( {image.meta?.alt )}
{title} {description} {sidePeekButton && sidePeekContent ? ( ) : (
{primaryButton && ( )} {secondaryButton && ( )}
)}
) }