deno.land / x / fresh@1.1.1 / tests / fixture / islands / kebab-case-counter-test.tsx

kebab-case-counter-test.tsx
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import { useState } from "preact/hooks";import { IS_BROWSER } from "$fresh/runtime.ts";
interface KebabCaseFileNameTestProps { start: number; id: string;}
export default function KebabCaseFileNameTest( props: KebabCaseFileNameTestProps,) { const [count, setCount] = useState(props.start); return ( <div id={props.id}> <p>{count}</p> <button id={`b-${props.id}`} onClick={() => setCount(count + 1)} disabled={!IS_BROWSER} > +1 </button> </div> );}
fresh

Version Info

Tagged at
2 years ago