import React, { useState } from "react"; import { Color } from "utils/Color"; import styles from "./QuotationCarousel.module.css"; interface QuotationCarouselProps { data: string[]; /** Width of the entire carousel including the buttons, in px. */ width?: number; /** Minimum height of the carousel, in px. */ height?: number; /** Diameter of the background circles, in px. Set to 0 for no circles. */ circleDiameter?: number; className?: string; } interface CarouselButtonProps { onClick: () => void; isPrevious?: boolean; } export function QuotationCarousel(props: QuotationCarouselProps) { const { data, width = 600, height = 100, circleDiameter = 120, className, } = props; const [activeIdx, setActiveIdx] = useState(0); function showNextCard() { setActiveIdx((activeIdx + 1) % data.length); } function showPreviousCard() { setActiveIdx((activeIdx - 1 + data.length) % data.length); } return (
    {data.map((quote, idx) => (
  • {quote}

  • ))}
); } function Circle({ className, diameter, }: { className: string; diameter: number; }) { return (
); } function CarouselButton({ isPrevious, onClick }: CarouselButtonProps) { return ( ); } function QuotationMark({ className }: { className: string }) { return ( ); }