@growth-angels/ds-core 1.21.0 → 1.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4,7 +4,7 @@ import { Button } from "../../atoms/atoms";
|
|
|
4
4
|
import Swiper from "swiper";
|
|
5
5
|
import { Autoplay, Navigation, Pagination } from "swiper/modules";
|
|
6
6
|
export const CarouselSwiper = (props) => {
|
|
7
|
-
const { children, slidesPerView: slidesPerViewDefault, spaceBetween = 48, navigation, pagination, hasPagination, hasNavigation, loop = false, autoplay, } = props;
|
|
7
|
+
const { children, slidesPerView: slidesPerViewDefault, spaceBetween = 48, navigation, pagination, hasPagination, hasNavigation, loop = false, autoplay, speed, } = props;
|
|
8
8
|
const classes = ["ga-ds-carousel"];
|
|
9
9
|
if (props.extraClassNames) {
|
|
10
10
|
if (typeof props.extraClassNames === "string") {
|
|
@@ -64,6 +64,7 @@ export const CarouselSwiper = (props) => {
|
|
|
64
64
|
autoplay: autoplay
|
|
65
65
|
? { delay: autoplay.delay || 5000, disableOnInteraction: autoplay.disableOnInteraction ?? false }
|
|
66
66
|
: false,
|
|
67
|
+
speed: speed || 300,
|
|
67
68
|
});
|
|
68
69
|
setSwiperInstance(swiper);
|
|
69
70
|
}
|
package/package.json
CHANGED
|
@@ -15,6 +15,7 @@ export const CarouselSwiper = (props: CarouselProps) => {
|
|
|
15
15
|
hasNavigation,
|
|
16
16
|
loop = false,
|
|
17
17
|
autoplay,
|
|
18
|
+
speed,
|
|
18
19
|
} = props
|
|
19
20
|
|
|
20
21
|
const classes = ["ga-ds-carousel"]
|
|
@@ -78,6 +79,7 @@ export const CarouselSwiper = (props: CarouselProps) => {
|
|
|
78
79
|
autoplay: autoplay
|
|
79
80
|
? { delay: autoplay.delay || 5000, disableOnInteraction: autoplay.disableOnInteraction ?? false }
|
|
80
81
|
: false,
|
|
82
|
+
speed: speed || 300,
|
|
81
83
|
})
|
|
82
84
|
|
|
83
85
|
setSwiperInstance(swiper)
|