MCPcopy Create free account
hub / github.com/MagicCube/agentara / CarouselPrevious

Function CarouselPrevious

web/src/components/ui/carousel.tsx:172–200  ·  view source on GitHub ↗
({
  className,
  variant = "outline",
  size = "icon",
  ...props
}: React.ComponentProps<typeof Button>)

Source from the content-addressed store, hash-verified

170}
171
172function CarouselPrevious({
173 className,
174 variant = "outline",
175 size = "icon",
176 ...props
177}: React.ComponentProps<typeof Button>) {
178 const { orientation, scrollPrev, canScrollPrev } = useCarousel()
179
180 return (
181 <Button
182 data-slot="carousel-previous"
183 variant={variant}
184 size={size}
185 className={cn(
186 "absolute size-8 rounded-full",
187 orientation === "horizontal"
188 ? "top-1/2 -left-12 -translate-y-1/2"
189 : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
190 className
191 )}
192 disabled={!canScrollPrev}
193 onClick={scrollPrev}
194 {...props}
195 >
196 <ArrowLeft />
197 <span className="sr-only">Previous slide</span>
198 </Button>
199 )
200}
201
202function CarouselNext({
203 className,

Callers

nothing calls this directly

Calls 2

cnFunction · 0.90
useCarouselFunction · 0.85

Tested by

no test coverage detected