1
0
mirror of https://github.com/jaandrle/deka-dom-el synced 2025-07-03 05:02:15 +02:00

🐛 removed #23, fixed readonly & ddeStringable

This commit is contained in:
2024-12-11 17:05:03 +01:00
parent 4c2edcf58c
commit 2105776d2a
10 changed files with 184 additions and 172 deletions

View File

@ -11,7 +11,7 @@ document.body.append(
);
function component({ className, textContent }){
return el("div", { className: [ "class1", className ] }).append(
return el("div", { className: [ "class1", className ].join(" ") }).append(
el("p", textContent)
);
}

View File

@ -92,8 +92,7 @@ export function page({ pkg, info }){
el("li").append(...T`You can use string or object as a value for ${el("code", "style")} property.`),
el("li").append(...T`
${el("code", "className")} (IDL preffered)/${el("code", "class")} are ways to add CSS classes
to the element. You can use string (similarly to ${el("code", "class=\"…\"")} syntax in HTML) or
array of strings. This is handy to concat conditional classes.
to the element. You can use string (similarly to ${el("code", "class=\"…\"")} syntax in HTML).
`),
el("li").append(...T`
Use ${el("code", "classList")} to toggle specific classes. This will be handy later when