diff --git a/src/components/cardStack/layouts/carousels/ButtonCarousel.tsx b/src/components/cardStack/layouts/carousels/ButtonCarousel.tsx index baaa4f4..c5c71c6 100644 --- a/src/components/cardStack/layouts/carousels/ButtonCarousel.tsx +++ b/src/components/cardStack/layouts/carousels/ButtonCarousel.tsx @@ -1,26 +1,182 @@ -import React, { useRef } from "react"; -import { useCardAnimation } from "@/components/cardStack/hooks/useCardAnimation"; +"use client"; -interface ButtonCarouselProps { - items?: any[]; -} +import { memo, Children } from "react"; +import useEmblaCarousel from "embla-carousel-react"; +import { ChevronLeft, ChevronRight } from "lucide-react"; +import CardStackTextBox from "../../CardStackTextBox"; +import { cls } from "@/lib/utils"; +import { ButtonCarouselProps } from "../../types"; +import { usePrevNextButtons } from "../../hooks/usePrevNextButtons"; +import { useScrollProgress } from "../../hooks/useScrollProgress"; +import { useCardAnimation } from "../../hooks/useCardAnimation"; -export default function ButtonCarousel({ items = [] }: ButtonCarouselProps) { - const state = useCardAnimation({ - rotationX: 0, - rotationY: 0, - rotationZ: 0, - perspective: 1000, - duration: 0.3, - }); +const ButtonCarousel = ({ + children, + uniformGridCustomHeightClasses, + animationType, + title, + titleSegments, + description, + tag, + tagIcon, + tagAnimation, + buttons, + buttonAnimation, + textboxLayout = "default", + useInvertedBackground, + bottomContent, + className = "", + containerClassName = "", + carouselClassName = "", + carouselItemClassName = "", + controlsClassName = "", + textBoxClassName = "", + titleClassName = "", + titleImageWrapperClassName = "", + titleImageClassName = "", + descriptionClassName = "", + tagClassName = "", + buttonContainerClassName = "", + buttonClassName = "", + buttonTextClassName = "", + ariaLabel, +}: ButtonCarouselProps) => { + const [emblaRef, emblaApi] = useEmblaCarousel({ dragFree: true }); - return ( -