Update index.js
Updated a few minor things.
This commit is contained in:
parent
a22ea20422
commit
f01cc4cf9c
1 changed files with 7 additions and 6 deletions
13
index.js
13
index.js
|
@ -38,7 +38,7 @@ class TabGroup extends EventEmitter {
|
|||
viewClass: args.viewClass || "etabs-view",
|
||||
closeButtonText: args.closeButtonText || "✖",
|
||||
newTab: args.newTab,
|
||||
newTabButtonText: args.newTabButton || "+",
|
||||
newTabButtonText: args.newTabButtonText || "+",
|
||||
ready: args.ready
|
||||
};
|
||||
this.tabContainer = document.querySelector(options.tabContainerSelector);
|
||||
|
@ -163,11 +163,12 @@ class Tab extends EventEmitter {
|
|||
let span = this.tabElements.icon;
|
||||
if (iconURL) {
|
||||
span.innerHTML = `<img src="${iconURL}" />`;
|
||||
} else if (icon) {
|
||||
span.innerHTML = `<i class="fa ${icon}"></i>`;
|
||||
}
|
||||
|
||||
this.emit("icon-changed", iconURL, this);
|
||||
this.emit("icon-changed", iconURL, this);
|
||||
} else if (icon) {
|
||||
span.innerHTML = `<i class="fa ${icon}"></i>`;
|
||||
this.emit("icon-changed", icon, this);
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue