feat: show rating
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import type { Signal } from "@preact/signals";
|
||||
import { Button } from "../components/Button.tsx";
|
||||
import { Button } from "@components/Button.tsx";
|
||||
|
||||
interface CounterProps {
|
||||
count: Signal<number>;
|
||||
@@ -7,10 +7,10 @@ interface CounterProps {
|
||||
|
||||
export default function Counter(props: CounterProps) {
|
||||
return (
|
||||
<div class="flex gap-8 py-6">
|
||||
<Button onClick={() => props.count.value -= 1}>-1</Button>
|
||||
<div class="flex gap-2 items-center">
|
||||
<Button onClick={() => props.count.value -= 1}>-</Button>
|
||||
<p class="text-3xl">{props.count}</p>
|
||||
<Button onClick={() => props.count.value += 1}>+1</Button>
|
||||
<Button onClick={() => props.count.value += 1}>+</Button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user