mirror of
https://github.com/atisawd/boxicons.git
synced 2024-12-20 20:33:10 +01:00
1.5.3
This commit is contained in:
parent
0474a3fddd
commit
e7f92ec31e
3 changed files with 7 additions and 2 deletions
|
@ -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) => {
|
||||
|
|
Loading…
Reference in a new issue