({
className,
variant = "outline",
size = "icon",
...props
}: React.ComponentProps<typeof Button>)
| 202 | } |
| 203 | |
| 204 | function CarouselNext({ |
| 205 | className, |
| 206 | variant = "outline", |
| 207 | size = "icon", |
| 208 | ...props |
| 209 | }: React.ComponentProps<typeof Button>) { |
| 210 | const { orientation, scrollNext, canScrollNext } = useCarousel() |
| 211 | |
| 212 | return ( |
| 213 | <Button |
| 214 | data-slot="carousel-next" |
| 215 | variant={variant} |
| 216 | size={size} |
| 217 | className={cn( |
| 218 | "absolute size-8 rounded-full", |
| 219 | orientation === "horizontal" |
| 220 | ? "top-1/2 -right-12 -translate-y-1/2" |
| 221 | : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90", |
| 222 | className |
| 223 | )} |
| 224 | disabled={!canScrollNext} |
| 225 | onClick={scrollNext} |
| 226 | {...props} |
| 227 | > |
| 228 | <ArrowRight /> |
| 229 | <span className="sr-only">Next slide</span> |
| 230 | </Button> |
| 231 | ) |
| 232 | } |
| 233 | |
| 234 | export { |
| 235 | type CarouselApi, |
nothing calls this directly
no test coverage detected