import type { FC } from 'react'; import type { Image as Img } from '../../../types'; import { ButtonLink, Heading, type HeadingLevel } from '../../atoms'; import { ResponsiveImage } from '../images'; import styles from './card.module.scss'; import { Meta, type MetaData } from './meta'; export type CardProps = { /** * Set additional classnames to the card wrapper. */ className?: string; /** * The card cover. */ cover?: Img; /** * The card id. */ id: string; /** * The card meta. */ meta?: MetaData; /** * 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}
); };