f591150512
* basics, framework-alpine, framework-solid, delete unused examples * framework-multiple * Remove non-standard file extensions, add missing .vscode folders * Remove robots.txt * Remove blog-multiple-authors * Rewrite components comments to be consistent * Update lockfile * Remove unnecessary usage of SCSS in subpath example * Fix props weirdness in portfolio example * Remove Lit from `framework-multiple` for now * Misc fixes * Update lockfile * I'm in lockfile hell, send help
34 lines
486 B
Svelte
34 lines
486 B
Svelte
<script lang="ts">
|
|
let count = 0;
|
|
|
|
function add() {
|
|
count += 1;
|
|
}
|
|
|
|
function subtract() {
|
|
count -= 1;
|
|
}
|
|
</script>
|
|
|
|
<div class="counter">
|
|
<button on:click={subtract}>-</button>
|
|
<pre>{count}</pre>
|
|
<button on:click={add}>+</button>
|
|
</div>
|
|
<div class="message">
|
|
<slot />
|
|
</div>
|
|
|
|
<style>
|
|
.counter {
|
|
display: grid;
|
|
font-size: 2em;
|
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
margin-top: 2em;
|
|
place-items: center;
|
|
}
|
|
|
|
.message {
|
|
text-align: center;
|
|
}
|
|
</style>
|