diff --git a/src/components/sections/feature/FeatureCardTen.tsx b/src/components/sections/feature/FeatureCardTen.tsx index aa540ff..319e348 100644 --- a/src/components/sections/feature/FeatureCardTen.tsx +++ b/src/components/sections/feature/FeatureCardTen.tsx @@ -1,263 +1,10 @@ -"use client"; +import React from 'react'; +import { TimelineProcessFlow } from '../../cardStack/layouts/timelines/TimelineProcessFlow'; -import React, { memo, useMemo } from "react"; -import TimelineProcessFlow from "@/components/cardStack/layouts/timelines/TimelineProcessFlow"; -import MediaContent from "@/components/shared/MediaContent"; -import { cls, shouldUseInvertedText } from "@/lib/utils"; -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"; - -type FeatureMedia = { - imageAlt?: string; - videoAriaLabel?: string; -} & ( - | { imageSrc: string; videoSrc?: never } - | { videoSrc: string; imageSrc?: never } - ); - -interface FeatureListItem { - icon: LucideIcon; - text: string; -} - -interface FeatureCard { - id: string; - title: string; - description: string; - media: FeatureMedia; - items: FeatureListItem[]; - reverse: boolean; -} - -interface FeatureCardTenProps { - features: FeatureCard[]; - title: string; - titleSegments?: TitleSegment[]; - description: string; - tag?: string; - tagIcon?: LucideIcon; - tagAnimation?: ButtonAnimationType; - buttons?: ButtonConfig[]; - buttonAnimation?: ButtonAnimationType; - textboxLayout: TextboxLayout; - animationType: CardAnimationType; - useInvertedBackground: InvertedBackground; - ariaLabel?: string; - className?: string; - containerClassName?: string; - textBoxClassName?: string; - textBoxTitleClassName?: string; - textBoxDescriptionClassName?: string; - textBoxTagClassName?: string; - textBoxButtonContainerClassName?: string; - textBoxButtonClassName?: string; - textBoxButtonTextClassName?: string; - titleImageWrapperClassName?: string; - titleImageClassName?: string; - itemClassName?: string; - mediaWrapperClassName?: string; - mediaCardClassName?: string; - numberClassName?: string; - contentWrapperClassName?: string; - featureTitleClassName?: string; - featureDescriptionClassName?: string; - listItemClassName?: string; - iconContainerClassName?: string; - iconClassName?: string; - gapClassName?: string; -} - -interface FeatureMediaProps { - media: FeatureMedia; - title: string; - mediaCardClassName: string; -} - -const FeatureMedia = ({ - media, - title, - mediaCardClassName, -}: FeatureMediaProps) => ( -
- +export function FeatureCardTen() { + return ( +
+
-); - -interface FeatureContentProps { - feature: FeatureCard; - useInvertedBackground: InvertedBackground; - shouldUseLightText: boolean; - featureTitleClassName: string; - featureDescriptionClassName: string; - listItemClassName: string; - iconContainerClassName: string; - iconClassName: string; + ); } - -const FeatureContent = ({ - feature, - useInvertedBackground, - shouldUseLightText, - featureTitleClassName, - featureDescriptionClassName, - listItemClassName, - iconContainerClassName, - iconClassName, -}: FeatureContentProps) => ( -
-

- {feature.title} -

-

- {feature.description} -

-
    - {feature.items.map((listItem, listIndex) => { - const Icon = listItem.icon; - return ( -
  • -
    - -
    -

    - {listItem.text} -

    -
  • - ); - })} -
-
-); - -const FeatureCardTen = ({ - features, - title, - titleSegments, - description, - tag, - tagIcon, - tagAnimation, - buttons, - buttonAnimation, - textboxLayout, - animationType, - useInvertedBackground, - ariaLabel = "Feature section", - className = "", - containerClassName = "", - textBoxClassName = "", - textBoxTitleClassName = "", - textBoxDescriptionClassName = "", - textBoxTagClassName = "", - textBoxButtonContainerClassName = "", - textBoxButtonClassName = "", - textBoxButtonTextClassName = "", - titleImageWrapperClassName = "", - titleImageClassName = "", - itemClassName = "", - mediaWrapperClassName = "", - mediaCardClassName = "", - numberClassName = "", - contentWrapperClassName = "", - featureTitleClassName = "", - featureDescriptionClassName = "", - listItemClassName = "", - iconContainerClassName = "", - iconClassName = "", - gapClassName = "", -}: FeatureCardTenProps) => { - const theme = useTheme(); - const shouldUseLightText = shouldUseInvertedText(useInvertedBackground, theme.cardStyle); - - const timelineItems = useMemo( - () => - features.map((feature) => ({ - id: feature.id, - reverse: feature.reverse, - media: ( - - ), - content: ( - - ), - })), - [ - features, - useInvertedBackground, - shouldUseLightText, - mediaCardClassName, - featureTitleClassName, - featureDescriptionClassName, - listItemClassName, - iconContainerClassName, - iconClassName, - ] - ); - - return ( - - ); -}; - -FeatureCardTen.displayName = "FeatureCardTen"; - -export default memo(FeatureCardTen); \ No newline at end of file