mirror of
https://github.com/jaandrle/deka-dom-el
synced 2026-10-25 16:51:48 +01:00
🔤 UI/UX/wording
This commit is contained in:
1 parent
57a5ff2dfe
commit
7f4787d704
27 files changed
+514
-359
No files matched your search
@@ -2,9 +2,9 @@ import { el } from "deka-dom-el";
|
||||
|
||||
// Create element with properties
|
||||
const button = el("button", {
|
||||
textContent: "Click me",
|
||||
className: "primary",
|
||||
disabled: true
|
||||
textContent: "Click me",
|
||||
className: "primary",
|
||||
disabled: true
|
||||
});
|
||||
|
||||
// Shorter and more expressive
|
||||
|
||||
@@ -6,12 +6,12 @@ button.disabled = true;
|
||||
|
||||
// Or using Object.assign()
|
||||
const button2 = Object.assign(
|
||||
document.createElement('button'),
|
||||
{
|
||||
textContent: "Click me",
|
||||
className: "primary",
|
||||
disabled: true
|
||||
}
|
||||
document.createElement('button'),
|
||||
{
|
||||
textContent: "Click me",
|
||||
className: "primary",
|
||||
disabled: true
|
||||
}
|
||||
);
|
||||
|
||||
// Add to DOM
|
||||
|
||||
Reference in new issue
Block a user