diff --git a/src/components/sections/feature/FeatureCardTwelve.tsx b/src/components/sections/feature/FeatureCardTwelve.tsx index 4f423ce..521d7b3 100644 --- a/src/components/sections/feature/FeatureCardTwelve.tsx +++ b/src/components/sections/feature/FeatureCardTwelve.tsx @@ -1,31 +1,182 @@ "use client"; -import React from "react"; +import { Fragment } from "react"; import CardList from "@/components/cardStack/CardList"; +import Button from "@/components/button/Button"; +import { cls, shouldUseInvertedText } from "@/lib/utils"; +import { getButtonProps } from "@/lib/buttonUtils"; +import { useTheme } from "@/providers/themeProvider/ThemeProvider"; +import type { LucideIcon } from "lucide-react"; +import type { ButtonConfig, ButtonAnimationType, CardAnimationType, TitleSegment } from "@/components/cardStack/types"; +import type { TextboxLayout, InvertedBackground } from "@/providers/themeProvider/config/constants"; + +interface FeatureCard { + id: string; + label: string; + title: string; + items: string[]; + buttons?: ButtonConfig[]; +} interface FeatureCardTwelveProps { - features?: any[]; - title?: string; - description?: string; - animationType?: string; - useInvertedBackground?: boolean; + features: FeatureCard[]; + animationType: CardAnimationType; + title: string; + titleSegments?: TitleSegment[]; + description: string; + tag?: string; + tagIcon?: LucideIcon; + tagAnimation?: ButtonAnimationType; + buttons?: ButtonConfig[]; + buttonAnimation?: ButtonAnimationType; + textboxLayout: TextboxLayout; + useInvertedBackground: InvertedBackground; + ariaLabel?: string; + className?: string; + containerClassName?: string; + cardClassName?: string; + textBoxTitleClassName?: string; + textBoxDescriptionClassName?: string; + textBoxClassName?: string; + textBoxTagClassName?: string; + textBoxButtonContainerClassName?: string; + textBoxButtonClassName?: string; + textBoxButtonTextClassName?: string; + titleImageWrapperClassName?: string; + titleImageClassName?: string; + cardContentClassName?: string; + labelClassName?: string; + cardTitleClassName?: string; + itemsContainerClassName?: string; + itemTextClassName?: string; + cardButtonClassName?: string; + cardButtonTextClassName?: string; } -export default function FeatureCardTwelve({ - features = [], - title = "Features", description = "Our features", animationType = "slide-up", useInvertedBackground = false, -}: FeatureCardTwelveProps) { - const items = features.map((feature) => ({ - id: feature.id, - label: feature.title, - detail: feature.description, - })); +const FeatureCardTwelve = ({ + features, + animationType, + title, + titleSegments, + description, + tag, + tagIcon, + tagAnimation, + buttons, + buttonAnimation, + textboxLayout, + useInvertedBackground, + ariaLabel = "Feature section", + className = "", + containerClassName = "", + cardClassName = "", + textBoxTitleClassName = "", + textBoxDescriptionClassName = "", + textBoxClassName = "", + textBoxTagClassName = "", + textBoxButtonContainerClassName = "", + textBoxButtonClassName = "", + textBoxButtonTextClassName = "", + titleImageWrapperClassName = "", + titleImageClassName = "", + cardContentClassName = "", + labelClassName = "", + cardTitleClassName = "", + itemsContainerClassName = "", + itemTextClassName = "", + cardButtonClassName = "", + cardButtonTextClassName = "", +}: FeatureCardTwelveProps) => { + const theme = useTheme(); + const shouldUseLightText = shouldUseInvertedText(useInvertedBackground, theme.cardStyle); return ( -
-

{title}

-

{description}

- -
+ + {features.map((feature) => ( +
+
+

+ {feature.label} +

+
+ +
+ +
+

+ {feature.title} +

+ +
+ {feature.items.map((item, index) => ( + + + {item} + + {index < feature.items.length - 1 && ( + + )} + + ))} +
+ + {feature.buttons && feature.buttons.length > 0 && ( +
+ {feature.buttons.slice(0, 2).map((button, index) => ( +
+ )} +
+
+ ))} + ); -} +}; + +FeatureCardTwelve.displayName = "FeatureCardTwelve"; + +export default FeatureCardTwelve;