Reworked workflow

This commit is contained in:
fedyna-k
2025-01-15 23:12:07 +01:00
parent 8dba8ca3d7
commit 8eb8174755
3 changed files with 0 additions and 32 deletions
-4
View File
@@ -1,11 +1,7 @@
name: "Check Deno code"
on:
push:
branches: ["main"]
pull_request:
types:
- opened
branches:
- main
-12
View File
@@ -1,12 +0,0 @@
import { JSX } from "preact";
import { IS_BROWSER } from "$fresh/runtime.ts";
export function Button(props: JSX.HTMLAttributes<HTMLButtonElement>) {
return (
<button
{...props}
disabled={!IS_BROWSER || props.disabled}
class="px-2 py-1 border-gray-500 border-2 rounded bg-white hover:bg-gray-200 transition-colors"
/>
);
}
-16
View File
@@ -1,16 +0,0 @@
import type { Signal } from "@preact/signals";
import { Button } from "../components/Button.tsx";
interface CounterProps {
count: Signal<number>;
}
export default function Counter(props: CounterProps) {
return (
<div class="flex gap-8 py-6">
<Button onClick={() => props.count.value -= 1}>-1</Button>
<p class="text-3xl tabular-nums">{props.count}</p>
<Button onClick={() => props.count.value += 1}>+1</Button>
</div>
);
}