diff --git a/src/components/sections/faq/FaqSplitMedia.tsx b/src/components/sections/faq/FaqSplitMedia.tsx index 1232aeb..e69de29 100644 --- a/src/components/sections/faq/FaqSplitMedia.tsx +++ b/src/components/sections/faq/FaqSplitMedia.tsx @@ -1,122 +0,0 @@ -import { useState } from "react"; -import { motion, AnimatePresence } from "motion/react"; -import { Plus } from "lucide-react"; -import ScrollReveal from "@/components/ui/ScrollReveal"; -import Button from "@/components/ui/Button"; -import TextAnimation from "@/components/ui/TextAnimation"; -import ImageOrVideo from "@/components/ui/ImageOrVideo"; -import { cls } from "@/lib/utils"; - -type FaqItem = { - question: string; - answer: string; -}; - -type FaqSplitMediaProps = { - tag: string; - title: string; - description: string; - primaryButton?: { text: string; href: string }; - secondaryButton?: { text: string; href: string }; - items: FaqItem[]; -} & ({ imageSrc: string; videoSrc?: never } | { videoSrc: string; imageSrc?: never }); - -const FaqSplitMedia = ({ - tag, - title, - description, - primaryButton, - secondaryButton, - items, - imageSrc, - videoSrc, -}: FaqSplitMediaProps) => { - const [activeIndex, setActiveIndex] = useState(null); - - const handleToggle = (index: number) => { - setActiveIndex(activeIndex === index ? null : index); - }; - - return ( -
-
-
-
-

{tag}

-
- - - - - - {(primaryButton || secondaryButton) && ( -
- {primaryButton &&
- )} -
- -
- - - - - - {items.map((item, index) => ( -
handleToggle(index)} - className="p-3 xl:p-3.5 2xl:p-4 rounded card cursor-pointer select-none" - > -
-

{item.question}

-
- -
-
- - {activeIndex === index && ( - -

{item.answer}

-
- )} -
-
- ))} -
-
-
-
- ); -}; - -export default FaqSplitMedia;