mirror of
https://github.com/atisawd/boxicons.git
synced 2025-08-31 11:21:52 +02:00
1.5.3
This commit is contained in:
@@ -86,7 +86,7 @@
|
||||
icons.forEach(function (iconName) {
|
||||
const $div = document.createElement("div");
|
||||
$div.setAttribute("class", "icon");
|
||||
$div.innerHTML = `<div>${iconName}</div><box-icon type="logo" name="${iconName}"></box-icon>`;
|
||||
$div.innerHTML = `<div>${iconName}</div><box-icon type="solid" name="${iconName}"></box-icon>`;
|
||||
$content.appendChild($div);
|
||||
});
|
||||
|
||||
|
2
dist/boxicons.js
vendored
2
dist/boxicons.js
vendored
File diff suppressed because one or more lines are too long
@@ -154,6 +154,7 @@ export class BoxIconElement extends HTMLElement {
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
this.$ui = this.attachShadow({ mode: 'open' });
|
||||
this.$ui.appendChild(this.ownerDocument.importNode(TEMPLATE.content, true));
|
||||
if (usingShadyCss()) {
|
||||
@@ -161,6 +162,7 @@ export class BoxIconElement extends HTMLElement {
|
||||
}
|
||||
this._state = {
|
||||
$iconHolder: this.$ui.getElementById('icon'),
|
||||
type: this.getAttribute('type')
|
||||
};
|
||||
}
|
||||
|
||||
@@ -244,6 +246,9 @@ function handleNameChange(inst, oldVal, newVal) {
|
||||
state.$iconHolder.textContent = '';
|
||||
|
||||
if (newVal) {
|
||||
|
||||
|
||||
|
||||
if(state.type!== undefined){
|
||||
inst.constructor.getIconSvg(newVal,state.type)
|
||||
.then((iconData) => {
|
||||
|
Reference in New Issue
Block a user