-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2d7653c
commit a39c451
Showing
2 changed files
with
19 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,26 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<script defer type="module" src="./index.ts"></script> | ||
<script src="./cdn/index.global.js"></script> | ||
</head> | ||
<body> | ||
<script type="application/javascript"> | ||
const Div = doom.Div | ||
const Button = doom.Button | ||
const signal = doom.signal | ||
const derive = doom.derive | ||
const d = doom.d | ||
|
||
function App() { | ||
var [counter, setCounter] = signal(1) | ||
var onclick = () => setCounter(counter() + 1) | ||
|
||
return Div([ | ||
Div(d`${counter}`), | ||
Button({ className: "pippo", onclick }, () => "Increment") | ||
]) | ||
} | ||
document.body.appendChild(App()); | ||
</script> | ||
</body> | ||
</html> |