feat: support kebab-case filenames for islands (#404)
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
/** @jsx h */
|
||||
import { h } from "preact";
|
||||
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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user