From fa3501c0d9e83aa6c0faad3dee90d1d259487e2d Mon Sep 17 00:00:00 2001 From: bender Date: Wed, 11 Mar 2026 20:09:06 +0000 Subject: [PATCH] Switch to version 3: modified src/components/sections/feature/featureBorderGlow/FeatureBorderGlow.tsx --- .../featureBorderGlow/FeatureBorderGlow.tsx | 159 +++++++++++++++--- 1 file changed, 134 insertions(+), 25 deletions(-) diff --git a/src/components/sections/feature/featureBorderGlow/FeatureBorderGlow.tsx b/src/components/sections/feature/featureBorderGlow/FeatureBorderGlow.tsx index 7ffce5e..881a2e5 100644 --- a/src/components/sections/feature/featureBorderGlow/FeatureBorderGlow.tsx +++ b/src/components/sections/feature/featureBorderGlow/FeatureBorderGlow.tsx @@ -1,46 +1,155 @@ -import React from 'react'; -import { CardStack } from '@/components/cardStack/CardStack'; +"use client"; -interface FeatureBorderGlowProps { - features: Array<{ - id: string; - title: string; - description: string; - }>; +import CardStack from "@/components/cardStack/CardStack"; +import FeatureBorderGlowItem from "./FeatureBorderGlowItem"; +import { shouldUseInvertedText } from "@/lib/utils"; +import { useTheme } from "@/providers/themeProvider/ThemeProvider"; +import type { LucideIcon } from "lucide-react"; +import type { + ButtonConfig, + CardAnimationType, + TitleSegment, + ButtonAnimationType, +} from "@/components/cardStack/types"; +import type { + TextboxLayout, + InvertedBackground, +} from "@/providers/themeProvider/config/constants"; + +interface FeatureCard { + icon: LucideIcon; title: string; description: string; - animationType?: 'none' | 'opacity' | 'slide-up' | 'scale-rotate' | 'blur-reveal'; - textboxLayout?: 'default' | 'split' | 'split-actions' | 'split-description' | 'inline-image'; - [key: string]: any; } -const FeatureBorderGlow: React.FC = ({ +interface FeatureBorderGlowProps { + features: FeatureCard[]; + carouselMode?: "auto" | "buttons"; + uniformGridCustomHeightClasses?: string; + 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; + iconContainerClassName?: string; + iconClassName?: string; + textBoxTitleClassName?: string; + textBoxTitleImageWrapperClassName?: string; + textBoxTitleImageClassName?: string; + textBoxDescriptionClassName?: string; + cardTitleClassName?: string; + cardDescriptionClassName?: string; + gridClassName?: string; + carouselClassName?: string; + controlsClassName?: string; + textBoxClassName?: string; + textBoxTagClassName?: string; + textBoxButtonContainerClassName?: string; + textBoxButtonClassName?: string; + textBoxButtonTextClassName?: string; +} + +const FeatureBorderGlow = ({ features, + carouselMode = "buttons", + uniformGridCustomHeightClasses = "min-h-75 2xl:min-h-85", + animationType, title, + titleSegments, description, - animationType = 'slide-up', - textboxLayout = 'default', - ...props -}) => { - const featureItems = features.map((feature) => ( -
-

{feature.title}

-

{feature.description}

-
- )); + tag, + tagIcon, + tagAnimation, + buttons, + buttonAnimation, + textboxLayout, + useInvertedBackground, + ariaLabel = "Feature section", + className = "", + containerClassName = "", + cardClassName = "", + iconContainerClassName = "", + iconClassName = "", + textBoxTitleClassName = "", + textBoxTitleImageWrapperClassName = "", + textBoxTitleImageClassName = "", + textBoxDescriptionClassName = "", + cardTitleClassName = "", + cardDescriptionClassName = "", + gridClassName = "", + carouselClassName = "", + controlsClassName = "", + textBoxClassName = "", + textBoxTagClassName = "", + textBoxButtonContainerClassName = "", + textBoxButtonClassName = "", + textBoxButtonTextClassName = "", +}: FeatureBorderGlowProps) => { + const theme = useTheme(); + const shouldUseLightText = shouldUseInvertedText( + useInvertedBackground, + theme.cardStyle + ); return ( - {featureItems} + {features.map((feature, index) => ( + + ))} ); }; -export default FeatureBorderGlow; \ No newline at end of file +FeatureBorderGlow.displayName = "FeatureBorderGlow"; + +export default FeatureBorderGlow;