import {ElementType, ReactNode} from 'react'
import Link from 'next/link'
import clsx from 'clsx'
import {twMerge} from 'tailwind-merge'
import {ChevronRightIcon} from '@/components/icons/ChevronRightIcon'
type Card = {
as?: ElementType
variant?: string
className?: string
children: ReactNode
}
type CardLink = {
href: string
children: ReactNode
}
type CardTitle = {
as?: ElementType
href: string
children: ReactNode
}
type CardDescription = {
children: ReactNode
className?: string
}
type CardCta = {
children: ReactNode
}
type CardEyebrow = {
as: ElementType
dateTime: string
decorate: boolean
className?: string
children: ReactNode
}
export function Card({
as: Component = 'div',
variant = 'normal',
className,
children
}: Card) {
type VariantStyles = {
normal: string
inline: string
}
const variantStyles: VariantStyles = {
normal:
'flex-col',
inline:
'flex-col md:flex-row md:justify-between',
}
return (
{children}
) } Card.Cta = function CardCta({children}: CardCta) { return ( ) } Card.Eyebrow = function CardEyebrow({ as: Component = 'p', decorate = false, className, children, ...props }: CardEyebrow) { return (