Skip to content

Commit

Permalink
Merge pull request #15 from Midlight25/develop
Browse files Browse the repository at this point in the history
Bootstrap 5 Beta 3 dependency update.
  • Loading branch information
Midlight25 authored Mar 25, 2021
2 parents c8140e3 + a8e79a1 commit 43bd39d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 17 deletions.
14 changes: 7 additions & 7 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
Expand Up @@ -33,7 +33,7 @@
},
"dependencies": {
"@popperjs/core": "^2.9.1",
"bootstrap": "^5.0.0-beta2",
"bootstrap": "^5.0.0-beta3",
"bootstrap-icons": "^1.4.0",
"parcel-bundler": "^1.12.5",
"pug": "^3.0.2",
Expand Down
23 changes: 14 additions & 9 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
'use strict;'
"use strict;";

// Importing Bootstrap Collapse and ScrollSpy
// Tree-shaking!
import { Collapse, ScrollSpy } from 'bootstrap';
import { Collapse, ScrollSpy } from "bootstrap";

console.log("Modules Loaded");

// Enable collapse elements
let collapseElementList:Array<HTMLElement> = [].slice.call(document.querySelectorAll('.collapse'));
let collapseList:Array<Collapse> = collapseElementList.map(function (collapseEl) {
return new Collapse(collapseEl, {
toggle: false
});
let collapseElementList: Array<HTMLElement> = [].slice.call(
document.querySelectorAll(".collapse")
);

let collapseList: Array<Collapse> = collapseElementList.map(function (
collapseEl
) {
return new Collapse(collapseEl, {
toggle: false,
});
});

// Enabling ScrollSpy
let scrollSpyElements:ScrollSpy = new ScrollSpy(document.body, {
target: '#navbarContent'
let scrollSpyElements: ScrollSpy = new ScrollSpy(document.body, {
target: "#navbarContent",
});

0 comments on commit 43bd39d

Please sign in to comment.