MCPcopy Create free account
hub / github.com/code-with-antonio/nodebase / useCarousel

Function useCarousel

src/components/ui/carousel.tsx:35–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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