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