MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / useCarousel

Function useCarousel

packages/react/src/components/carousel.tsx:33–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31const CarouselContext = React.createContext<CarouselContextProps | null>(null);
32
33function useCarousel() {
34 const context = React.useContext(CarouselContext);
35
36 if (!context) {
37 throw new Error("useCarousel must be used within a <Carousel />");
38 }
39
40 return context;
41}
42
43function Carousel({
44 orientation = "horizontal",

Callers 4

CarouselContentFunction · 0.85
CarouselItemFunction · 0.85
CarouselPreviousFunction · 0.85
CarouselNextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected