import React from "react"; import { cn } from "../../lib/utils"; export interface CardProps { title: string; description: string; imageSrc: string; buttonText: string; buttonLink?: string; imageAlt?: string; accentColor?: string; onClick?: () => void; } interface InteractiveCardGalleryProps { cards: CardProps[]; className?: string; cardHeight?: string; columns?: 1 | 2 | 3 | 4; hoverScale?: number; transitionDuration?: number; } const CardItem = ({ title, description, imageSrc, buttonText, buttonLink, imageAlt, accentColor = "yellow", onClick, }: CardProps) => { const handleClick = (e: React.MouseEvent) => { if (buttonLink) { if (!onClick) return; e.preventDefault(); } onClick?.(); }; return (

{title}

{description}

); }; export function InteractiveCardGallery({ cards, className, cardHeight = "h-64", columns = 4, hoverScale = 1.1, transitionDuration = 700, }: InteractiveCardGalleryProps) { const getGridCols = () => { switch (columns) { case 1: return "grid-cols-1"; case 2: return "sm:grid-cols-2"; case 3: return "sm:grid-cols-2 lg:grid-cols-3"; case 4: default: return "sm:grid-cols-2 lg:grid-cols-4"; } }; return (
{cards.map((card, index) => (
))}
); }