diff --git a/src/components/cardStack/layouts/carousels/ButtonCarousel.tsx b/src/components/cardStack/layouts/carousels/ButtonCarousel.tsx index 1a0e13c..c5c71c6 100644 --- a/src/components/cardStack/layouts/carousels/ButtonCarousel.tsx +++ b/src/components/cardStack/layouts/carousels/ButtonCarousel.tsx @@ -1,25 +1,182 @@ -import { ReactNode } from 'react'; -import { useCardStack } from '../../CardStackContext'; +"use client"; -export interface ButtonCarouselProps { - children: ReactNode; - className?: string; - ariaLabel?: string; -} +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 function ButtonCarousel({ children, className = '', ariaLabel = 'Button carousel' }: ButtonCarouselProps) { - const { isVisible, getAnimationProps } = useCardStack(); - const animationProps = getAnimationProps(); +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 ( -