add fresh project
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { useSignal } from "@preact/signals";
|
||||
import { Button } from "../components/ui/button.tsx";
|
||||
|
||||
export default function Counter() {
|
||||
const count = useSignal<number>(3);
|
||||
return (
|
||||
<div class="flex gap-8 py-6">
|
||||
<Button variant="outline" id="decrement" onClick={() => count.value -= 1}>
|
||||
-1
|
||||
</Button>
|
||||
<p class="text-3xl tabular-nums">{count.value}</p>
|
||||
<Button variant="outline" id="increment" onClick={() => count.value += 1}>
|
||||
+1
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user