MCPcopy Index your code
hub / github.com/sourcebot-dev/sourcebot / useCarousel

Function useCarousel

packages/web/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
45const Carousel = React.forwardRef<
46 HTMLDivElement,

Callers 1

carousel.tsxFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected