MCPcopy
hub / github.com/TheOrcDev/8bitcn-ui / useCarousel

Function useCarousel

components/ui/8bit/carousel.tsx:36–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

carousel.tsxFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected