feat: support kebab-case filenames for islands (#404)

This commit is contained in:
Stephen Delaney
2022-07-06 12:42:25 +02:00
committed by GitHub
parent 38c1a2f426
commit a7b198fdf4
5 changed files with 46 additions and 2 deletions
@@ -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>
);
}