"use client"; import { memo } from "react"; import SectionNumber from "./SectionNumber"; interface NumberCardProps { number: number; text: string; size?: "Small" | "Medium" | "Large" | "XLarge"; iconShape?: string; iconColor?: string; } const NumberCard = memo(({ number, text, size }) => { // Base classes common to all sizes const baseClasses = "bg-[var(--color-surface-inverse-primary)] rounded-[12px] shadow-lg"; // If size prop is provided, use explicit size classes // Otherwise, use responsive breakpoints for backward compatibility if (size) { // Size-specific classes const sizeClasses = { Small: "flex flex-col items-end justify-center gap-4 p-5 relative", Medium: "flex flex-row items-center gap-8 p-8 relative", Large: "flex flex-col items-start justify-end gap-[22px] h-[238px] p-8 relative", XLarge: "flex flex-col items-start justify-end gap-[22px] h-[238px] p-8 relative", }; // Text size classes const textClasses = { Small: "font-bricolage-grotesque font-medium text-[24px] leading-[32px] text-[#141414]", Medium: "font-bricolage-grotesque font-medium text-[24px] leading-[24px] text-[#141414]", Large: "font-bricolage-grotesque font-medium text-[24px] leading-[24px] text-[#141414]", XLarge: "font-bricolage-grotesque font-medium text-[32px] leading-[32px] text-[#141414]", }; // Section number positioning classes const sectionNumberClasses = { Small: "flex justify-end items-end", Medium: "flex justify-start flex-shrink-0", Large: "absolute top-8 right-8", XLarge: "absolute top-8 right-8", }; // Content container classes const contentClasses = { Small: "", Medium: "flex-1", Large: "absolute bottom-8 left-8 right-16", XLarge: "absolute bottom-8 left-8 right-16", }; return (
{/* Section Number */}
{/* Card Content */}

{text}

); } // Responsive breakpoints for backward compatibility (matches original behavior) // Maps to: Small (mobile) -> Medium (sm) -> Large (lg) -> XLarge (xl) return (
{/* Section Number - Responsive positioning */}
{/* Card Content - Responsive positioning */}

{text}

); }); NumberCard.displayName = "NumberCard"; export default NumberCard;