From e12f14df33bd7ae3c4e91ca4e5198a27cdfac680 Mon Sep 17 00:00:00 2001 From: bender Date: Wed, 11 Mar 2026 20:06:29 +0000 Subject: [PATCH] Update src/components/sections/feature/FeatureCardOne.tsx --- .../sections/feature/FeatureCardOne.tsx | 199 +++--------------- 1 file changed, 24 insertions(+), 175 deletions(-) diff --git a/src/components/sections/feature/FeatureCardOne.tsx b/src/components/sections/feature/FeatureCardOne.tsx index 40eeeb4..b04484d 100644 --- a/src/components/sections/feature/FeatureCardOne.tsx +++ b/src/components/sections/feature/FeatureCardOne.tsx @@ -1,196 +1,45 @@ -"use client"; - -import CardStack from "@/components/cardStack/CardStack"; -import MediaContent from "@/components/shared/MediaContent"; -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, GridVariant, CardAnimationTypeWith3D, TitleSegment, ButtonAnimationType } from "@/components/cardStack/types"; - -import type { TextboxLayout, InvertedBackground } from "@/providers/themeProvider/config/constants"; - -type FeatureCard = { - title: string; - description: string; - button?: ButtonConfig; -} & ( - | { - imageSrc: string; - imageAlt?: string; - videoSrc?: never; - videoAriaLabel?: never; - } - | { - videoSrc: string; - videoAriaLabel?: string; - imageSrc?: never; - imageAlt?: never; - } - ); +import React from 'react'; +import { CardStack } from '@/components/cardStack/CardStack'; interface FeatureCardOneProps { - features: FeatureCard[]; - carouselMode?: "auto" | "buttons"; - gridVariant: GridVariant; - uniformGridCustomHeightClasses?: string; - animationType: CardAnimationTypeWith3D; + features: Array<{ + id: string; + title: string; + description: string; + }>; 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; - mediaClassName?: string; - textBoxTitleClassName?: string; - textBoxTitleImageWrapperClassName?: string; - textBoxTitleImageClassName?: string; - textBoxDescriptionClassName?: string; - cardTitleClassName?: string; - cardDescriptionClassName?: string; - cardButtonClassName?: string; - cardButtonTextClassName?: string; - gridClassName?: string; - carouselClassName?: string; - controlsClassName?: string; - textBoxClassName?: string; - textBoxTagClassName?: string; - textBoxButtonContainerClassName?: string; - textBoxButtonClassName?: string; - textBoxButtonTextClassName?: string; + gridVariant?: string; + animationType?: string; + [key: string]: any; } -const FeatureCardOne = ({ +const FeatureCardOne: React.FC = ({ features, - carouselMode = "buttons", - gridVariant, - uniformGridCustomHeightClasses, - animationType, title, - titleSegments, description, - tag, - tagIcon, - tagAnimation, - buttons, - buttonAnimation, - textboxLayout, - useInvertedBackground, - ariaLabel = "Feature section", - className = "", - containerClassName = "", - cardClassName = "", - mediaClassName = "", - textBoxTitleClassName = "", - textBoxTitleImageWrapperClassName = "", - textBoxTitleImageClassName = "", - textBoxDescriptionClassName = "", - cardTitleClassName = "", - cardDescriptionClassName = "", - cardButtonClassName = "", - cardButtonTextClassName = "", - gridClassName = "", - carouselClassName = "", - controlsClassName = "", - textBoxClassName = "", - textBoxTagClassName = "", - textBoxButtonContainerClassName = "", - textBoxButtonClassName = "", - textBoxButtonTextClassName = "", -}: FeatureCardOneProps) => { - const theme = useTheme(); - const shouldUseLightText = shouldUseInvertedText(useInvertedBackground, theme.cardStyle); - - const getButtonConfigProps = () => { - if (theme.defaultButtonVariant === "hover-bubble") { - return { bgClassName: "w-full" }; - } - if (theme.defaultButtonVariant === "icon-arrow") { - return { className: "justify-between" }; - } - return {}; - }; + gridVariant = 'uniform-all-items-equal', + animationType = 'slide-up', + ...props +}) => { + const featureItems = features.map((feature) => ( +
+

{feature.title}

+

{feature.description}

+
+ )); return ( - {features.map((feature, index) => ( -
- -
-

- {feature.title} -

-

- {feature.description} -

-
- {feature.button && ( -
- ))} + {featureItems}
); }; -FeatureCardOne.displayName = "FeatureCardOne"; - -export default FeatureCardOne; +export default FeatureCardOne; \ No newline at end of file