Fixed bug in create two ul
This commit is contained in:
parent
415afb9d5e
commit
0035cb2f75
@ -77,12 +77,14 @@ export class DropDown {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!styles) {
|
||||
const templete = items.map((item) => `<li class="list__item" >${item}</li>`).join('');
|
||||
this.#element.innerHTML += `<ul class="list">${templete}</ul>`;
|
||||
}
|
||||
|
||||
if (styles) {
|
||||
const templete = items.map((item) => `<li class="list__item" >${item}</li>`).join('');
|
||||
this.#element.innerHTML += `<ul class="list style = "${styles}">${templete}</ul>`;
|
||||
this.#element.innerHTML += `<ul class="list" style="${styles}" >${templete}</ul>`;
|
||||
this.#customStyles(styles);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user