MCPcopy Index your code
hub / github.com/CodeGraphContext/CodeGraphContext / useCarousel

Function useCarousel

website/src/components/ui/carousel.tsx:31–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29const CarouselContext = React.createContext<CarouselContextProps | null>(null);
30
31function useCarousel() {
32 const context = React.useContext(CarouselContext);
33
34 if (!context) {
35 throw new Error("useCarousel must be used within a <Carousel />");
36 }
37
38 return context;
39}
40
41const Carousel = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement> & CarouselProps>(
42 ({ orientation = "horizontal", opts, setApi, plugins, className, children, ...props }, ref) => {

Callers 1

carousel.tsxFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected