import Link from 'next/link' import clsx from 'clsx' import {ElementType, ReactNode} from 'react' import {Props} from 'types' type Card = { as?: ElementType className?: string small?: boolean children: ReactNode } type CardLink = { href: string children: ReactNode } type CardTitle = { as?: ElementType href: string children: ReactNode } type CardDescription = { children: ReactNode } type CardCta = { children: ReactNode } type CardEyebrow = { as: ElementType dateTime: string decorate: boolean className?: string children: ReactNode } function ChevronRightIcon(props: Props) { return ( ) } export function Card({ as: Component = 'div', className, small, children }: Card) { return ( {children} ) } Card.Link = function CardLink({href, children}: CardLink) { return ( <>
{children} ) } Card.Title = function CardTitle({as: Component = 'h2', href, children}: CardTitle) { return ( {href ? {children} : children} ) } Card.Description = function CardDescription({children}: CardDescription) { return (

{children}

) } Card.Cta = function CardCta({children}: CardCta) { return ( ) } Card.Eyebrow = function CardEyebrow({ as: Component = 'p', decorate = false, className, children, ...props }: CardEyebrow) { return ( {decorate && ( ) }