Skip to content

Commit

Permalink
(feat): Add obser slides for dynamic slides in slider
Browse files Browse the repository at this point in the history
  • Loading branch information
JayaKrishnaNamburu committed Dec 19, 2023
1 parent ac8c006 commit 8019cc9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@teleporthq/teleport-custom-scripts",
"version": "0.0.24",
"version": "0.0.24-alpha-0",
"main": "dist/index.umd.js",
"module": "dist/index.mjs",
"private": false,
Expand Down
4 changes: 3 additions & 1 deletion src/slider.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Swiper } from "swiper";
import { SwiperOptions } from 'swiper/types'
import { Navigation, Autoplay, Pagination } from "swiper/modules";
import "swiper/css";
import "swiper/css/navigation";
Expand Down Expand Up @@ -112,8 +113,9 @@ export class Slider {
}

const modules = [Navigation, Autoplay, Pagination];
const swiperOptions = {
const swiperOptions: SwiperOptions = {
modules,
observeSlideChildren: true,
navigation: {
nextEl: nextButton,
prevEl: prevButton,
Expand Down

0 comments on commit 8019cc9

Please sign in to comment.