import "./Card.css"; interface CardProps { image?: string; imageAlt?: string; title?: string; subtitle?: string; children: React.ReactNode; footer?: React.ReactNode; className?: string; } const Card = ({ image, imageAlt = "", title, subtitle, children, footer, className, }: CardProps) => { const classNames = `card${className ? ` ${className}` : ""}`; return (
{image && {imageAlt}} {(title || subtitle) && (
{title &&

{title}

} {subtitle &&

{subtitle}

}
)}
{children}
{footer &&
{footer}
}
); }; export default Card;