"use client"; import { memo } from "react"; import Image from "next/image"; interface MiniCardProps { children?: React.ReactNode; className?: string; backgroundColor?: string; panelContent?: string; label?: string; labelLine1?: string; labelLine2?: string; onClick?: () => void; href?: string; ariaLabel?: string; } const MiniCard = memo( ({ children, className = "", backgroundColor = "bg-[var(--color-surface-default-brand-royal)]", panelContent, label, labelLine1, labelLine2, onClick, href, ariaLabel, }) => { const cardContent = (
{/* Top part - Inner panel */}
{/* Content for the inner panel */} {panelContent && (
{
)} {children}
{/* Bottom part - Text container */}
{labelLine1 && labelLine2 ? ( <>
{labelLine1}
{labelLine2}
 
) : ( label )}
); // If href is provided, render as a link if (href) { return ( {cardContent} ); } // If onClick is provided, render as a button if (onClick) { return ( ); } // Default render as a div return (
{cardContent}
); }, ); MiniCard.displayName = "MiniCard"; export default MiniCard;