import Link from "next/link" import Image from "@/components/Image" import Button from "@/components/TempDesignSystem/Button" import BiroScript from "@/components/TempDesignSystem/Text/BiroScript" import Body from "@/components/TempDesignSystem/Text/Body" import Title from "@/components/TempDesignSystem/Text/Title" import { getBodyFontColor, getButtonTheme, getScriptFontColor, getTitleFontColor, } from "./utils" import { cardVariants } from "./variants" import styles from "./card.module.css" import type { CardProps } from "./card" export default function Card({ primaryButton, secondaryButton, scriptedTopTitle, heading, bodyText, className, theme, backgroundImage, imageHeight, imageWidth, imageGradient, onPrimaryButtonClick, onSecondaryButtonClick, }: CardProps) { const buttonTheme = getButtonTheme(theme) const titleFontColor = getTitleFontColor(theme) const scriptFontColor = getScriptFontColor(theme) const bodyFontColor = getBodyFontColor(theme) imageHeight = imageHeight || 320 imageWidth = imageWidth || (backgroundImage?.dimensions ? backgroundImage.dimensions.aspectRatio * imageHeight : 420) return (
{backgroundImage && (
{backgroundImage.meta.alt
)}
{scriptedTopTitle ? (
{scriptedTopTitle}
) : null} {heading} {bodyText ? ( {bodyText} ) : null}
{primaryButton ? ( ) : null} {secondaryButton ? ( ) : null}
) }