mirror of
https://github.com/jaandrle/deka-dom-el
synced 2025-07-02 20:52:14 +02:00
🔤 texts helpers
infuture may be also translations
This commit is contained in:
5
docs_src/components/examples/introducing/3ps.js
Normal file
5
docs_src/components/examples/introducing/3ps.js
Normal file
@ -0,0 +1,5 @@
|
||||
const onchage=
|
||||
event=>
|
||||
console.log("Reacting to the:", event); // A
|
||||
input.addEventListener("change", onchange); // B
|
||||
input.dispatchEvent(new Event("change")); // C
|
15
docs_src/components/examples/introducing/helloWorld.js
Normal file
15
docs_src/components/examples/introducing/helloWorld.js
Normal file
@ -0,0 +1,15 @@
|
||||
import { el } from "deka-dom-el";
|
||||
import { S } from "deka-dom-el/signals";
|
||||
const clicks= S(0);
|
||||
document.body.append(
|
||||
el().append(
|
||||
el("p", S(()=>
|
||||
"Hello World "+"🎉".repeat(clicks())
|
||||
)),
|
||||
el("button", {
|
||||
type: "button",
|
||||
onclick: ()=> clicks(clicks()+1),
|
||||
textContent: "Fire"
|
||||
})
|
||||
)
|
||||
);
|
Reference in New Issue
Block a user