"use client"; import React, { memo } from "react"; import TextAnimation from "@/components/text/TextAnimation"; import { cls, shouldUseInvertedText } from "@/lib/utils"; import { useTheme } from "@/providers/themeProvider/ThemeProvider"; import type { LucideIcon } from "lucide-react"; interface Feature { icon: LucideIcon; title: string; description: string; } interface AboutFeatureProps { title: string; features: Feature[]; useInvertedBackground: "noInvert" | "invertDefault" | "invertCard"; ariaLabel?: string; className?: string; containerClassName?: string; titleClassName?: string; featuresContainerClassName?: string; featureCardClassName?: string; featureIconContainerClassName?: string; featureIconClassName?: string; featureTitleClassName?: string; featureDescriptionClassName?: string; } const AboutFeature = ({ title, features, useInvertedBackground, ariaLabel = "About features section", className = "", containerClassName = "", titleClassName = "", featuresContainerClassName = "", featureCardClassName = "", featureIconContainerClassName = "", featureIconClassName = "", featureTitleClassName = "", featureDescriptionClassName = "", }: AboutFeatureProps) => { const theme = useTheme(); const shouldUseLightText = shouldUseInvertedText(useInvertedBackground, theme.cardStyle); const gridColsMap = { 2: "md:grid-cols-2", 3: "md:grid-cols-3", 4: "md:grid-cols-4", }; const gridCols = gridColsMap[features.length as keyof typeof gridColsMap] || "md:grid-cols-4"; return (
{features.map((feature, index) => { const Icon = feature.icon; return (

{feature.title}

{feature.description}

); })}
); }; AboutFeature.displayName = "AboutFeature"; export default memo(AboutFeature);