Skip to content

Commit

Permalink
import only slider
Browse files Browse the repository at this point in the history
  • Loading branch information
JayaKrishnaNamburu committed Nov 2, 2023
1 parent a7d5211 commit 46a99a5
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1,352 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.22-alpha-12",
"version": "0.0.22-alpha-13",
"main": "dist/index.umd.js",
"module": "dist/index.mjs",
"private": false,
Expand Down
12 changes: 0 additions & 12 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import { Dropdown } from './dropdown'
import { Menu } from './menu'
import { Accordion } from './accordion'
import { Slider } from './slider'

let url = location.href;
Expand All @@ -9,9 +6,6 @@ document.body.addEventListener(
() => {
requestAnimationFrame(() => {
if (url !== location.href) {
new Menu().init();
new Accordion().init();
new Dropdown().init()
new Slider().init()
url = location.href;
}
Expand All @@ -23,16 +17,10 @@ document.body.addEventListener(
const appDiv = document.getElementById("app");
if (appDiv) {
const observer = new MutationObserver(() => {
new Dropdown().init()
new Menu().init();
new Accordion().init();
new Slider().init()
observer.disconnect();
});
observer.observe(document.body, { childList: true });
} else {
new Dropdown().init()
new Menu().init();
new Accordion().init();
new Slider().init()
}
Loading

0 comments on commit 46a99a5

Please sign in to comment.