From 78a32f03e6f1dc7de142fae6ac366b624cb35a25 Mon Sep 17 00:00:00 2001 From: Quan Khuc Date: Tue, 4 Jun 2024 16:03:17 -0500 Subject: [PATCH] fix: dot buttons work with orientation --- apps/www/src/content/docs/components/carousel.md | 3 --- .../registry/default/example/CarouselOrientation.vue | 9 +++++---- .../default/ui/carousel/CarouselDotButtons.vue | 10 +++++----- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/apps/www/src/content/docs/components/carousel.md b/apps/www/src/content/docs/components/carousel.md index 8283c076..947e11f6 100644 --- a/apps/www/src/content/docs/components/carousel.md +++ b/apps/www/src/content/docs/components/carousel.md @@ -281,6 +281,3 @@ import Autoplay from 'embla-carousel-autoplay' See the [Embla Carousel docs](https://www.embla-carousel.com/api/plugins/) for more information on using plugins. -``` - -## diff --git a/apps/www/src/lib/registry/default/example/CarouselOrientation.vue b/apps/www/src/lib/registry/default/example/CarouselOrientation.vue index dcf06bd6..cd27a9a4 100644 --- a/apps/www/src/lib/registry/default/example/CarouselOrientation.vue +++ b/apps/www/src/lib/registry/default/example/CarouselOrientation.vue @@ -1,18 +1,18 @@ diff --git a/apps/www/src/lib/registry/default/ui/carousel/CarouselDotButtons.vue b/apps/www/src/lib/registry/default/ui/carousel/CarouselDotButtons.vue index 866e44b4..7617d62b 100644 --- a/apps/www/src/lib/registry/default/ui/carousel/CarouselDotButtons.vue +++ b/apps/www/src/lib/registry/default/ui/carousel/CarouselDotButtons.vue @@ -4,15 +4,15 @@ import type { WithClassAsProps } from './interface' import { cn } from '@/lib/utils' const props = defineProps() -const { scrollTo, selectedIndex, scrollSnaps } = useCarousel() +const { scrollTo, selectedIndex, scrollSnaps, orientation } = useCarousel()