Skip to content

Commit d409f9c

Browse files
committed
fix: use direction-responsive positioning
1 parent 0bcf4d2 commit d409f9c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/components/ui/carousel.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ const CarouselPrevious = React.forwardRef<
209209
className={cn(
210210
"absolute h-8 w-8 rounded-full",
211211
orientation === "horizontal"
212-
? "left-5 top-1/2 -translate-y-1/2"
213-
: "-top-12 left-1/2 -translate-x-1/2 rotate-90",
212+
? "start-5 top-1/2 -translate-y-1/2"
213+
: "-top-12 start-1/2 -translate-x-1/2 rotate-90",
214214
className
215215
)}
216216
disabled={!canScrollPrev}
@@ -238,8 +238,8 @@ const CarouselNext = React.forwardRef<
238238
className={cn(
239239
"absolute h-8 w-8 rounded-full",
240240
orientation === "horizontal"
241-
? "right-5 top-1/2 -translate-y-1/2"
242-
: "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
241+
? "end-5 top-1/2 -translate-y-1/2"
242+
: "-bottom-12 start-1/2 -translate-x-1/2 rotate-90",
243243
className
244244
)}
245245
disabled={!canScrollNext}

0 commit comments

Comments
 (0)