gd-bs 5.9.5 → 5.9.7
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.
- package/build/bs.js +1 -1
- package/build/components/common.js +11 -8
- package/build/components/navbar/item.js +1 -2
- package/dist/gd-bs-icons.js +1 -1
- package/dist/gd-bs-icons.min.js +1 -1
- package/dist/gd-bs.js +1 -1
- package/dist/gd-bs.min.js +1 -1
- package/package.json +1 -1
- package/src/components/common.ts +11 -8
- package/src/components/navbar/item.ts +1 -2
- package/src/styles/_custom.scss +1 -0
|
@@ -54,14 +54,17 @@ var configureParent = function (component, parent) {
|
|
|
54
54
|
exports.configureParent = configureParent;
|
|
55
55
|
var setClassNames = function (el, className) {
|
|
56
56
|
if (className === void 0) { className = ""; }
|
|
57
|
-
//
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
var
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
57
|
+
// Ensure the element exists
|
|
58
|
+
if (el) {
|
|
59
|
+
// Set the class names
|
|
60
|
+
var classNames = className.split(' ');
|
|
61
|
+
for (var i = 0; i < classNames.length; i++) {
|
|
62
|
+
// Ensure the class name exists
|
|
63
|
+
var className_1 = classNames[i];
|
|
64
|
+
if (className_1) {
|
|
65
|
+
// Add the class
|
|
66
|
+
el.classList.add(className_1);
|
|
67
|
+
}
|
|
65
68
|
}
|
|
66
69
|
}
|
|
67
70
|
};
|
|
@@ -28,7 +28,7 @@ var NavbarItem = /** @class */ (function () {
|
|
|
28
28
|
}
|
|
29
29
|
// Configures the item
|
|
30
30
|
NavbarItem.prototype.configure = function () {
|
|
31
|
-
var link =
|
|
31
|
+
var link = this._el.querySelector("a");
|
|
32
32
|
// See if this is a dropdown
|
|
33
33
|
if (this._props.items) {
|
|
34
34
|
// Render a dropdown menu
|
|
@@ -54,7 +54,6 @@ var NavbarItem = /** @class */ (function () {
|
|
|
54
54
|
// Else, ensure there is text
|
|
55
55
|
else if (this._props.text) {
|
|
56
56
|
// Update the link
|
|
57
|
-
link = this._el.querySelector("a");
|
|
58
57
|
if (link) {
|
|
59
58
|
this._props.isActive ? link.classList.add("active") : link.removeChild(link.querySelector('span'));
|
|
60
59
|
link.innerHTML = this._props.text == null ? "" : this._props.text;
|