import NextImage, { type ImageProps as NextImageProps } from 'next/image'; import type { FC } from 'react'; import { ButtonLink, Figure, Heading, type HeadingLevel } from '../../atoms'; import { MetaList, type MetaItemData } from '../meta-list'; import styles from './card.module.scss'; export type CardProps = { /** * Set additional classnames to the card wrapper. */ className?: string; /** * The card cover. */ cover?: Pick; /** * The card id. */ id: string; /** * The card meta. */ meta?: MetaItemData[]; /** * The card tagline. */ tagline?: string; /** * The card title. */ title: string; /** * The title level (hn). */ titleLevel: HeadingLevel; /** * The card target. */ url: string; }; /** * Card component * * Render a link with minimal information about its content. */ export const Card: FC = ({ className = '', cover, id, meta, tagline, title, titleLevel, url, }) => { const cardClass = `${styles.wrapper} ${className}`; const headingId = `${id}-heading`; return (
{cover ? (
) : null} {title}
{tagline ?
{tagline}
: null} {meta ? ( ) : null}
); };