erstellung des div wrapps in ShoppingCategory für Frontend Kategorie Erstellung
This commit is contained in:
1 parent
f9188b09b1
commit
61e44916b2
1 file changed
+8
-5
@@ -12,6 +12,7 @@ export class ShoppingCategory {
|
||||
|
||||
render() {
|
||||
const li = document.createElement("li");
|
||||
const categoryHeaderDiv = document.createElement("div");
|
||||
const span = document.createElement("span");
|
||||
const deleteCategoryButton = document.createElement("button");
|
||||
const deleteAllItemsCheckbox = document.createElement("input");
|
||||
@@ -19,18 +20,20 @@ export class ShoppingCategory {
|
||||
li.id = this.categoryID;
|
||||
li.classList.add("category");
|
||||
|
||||
|
||||
categoryHeaderDiv.classList.add("category__div");
|
||||
|
||||
span.textContent = this.categoryName;
|
||||
span.classList.add("category__name--bold", "category__name--big");
|
||||
span.classList.add("category__name", "category__name--bold", "category__name--big");
|
||||
|
||||
deleteCategoryButton.classList.add("category__deleteButton");
|
||||
deleteCategoryButton.textContent = "Kategorie löschen";
|
||||
|
||||
deleteAllItemsCheckbox.setAttribute("type", "checkbox");
|
||||
|
||||
li.appendChild(span);
|
||||
li.appendChild(deleteCategoryButton);
|
||||
li.appendChild(deleteAllItemsCheckbox);
|
||||
li.appendChild(innerUl);
|
||||
categoryHeaderDiv.append(span, deleteCategoryButton, deleteAllItemsCheckbox);
|
||||
|
||||
li.append(categoryHeaderDiv, innerUl);
|
||||
|
||||
return li;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user