add Fresh Components (#872)

This commit is contained in:
hashrock
2022-11-07 22:24:32 +09:00
committed by GitHub
parent ff7cac13dd
commit fea7a27029
19 changed files with 450 additions and 25 deletions
+14
View File
@@ -0,0 +1,14 @@
import { JSX } from "preact";
import { IS_BROWSER } from "$fresh/runtime.ts";
export default function Input(props: JSX.HTMLAttributes<HTMLInputElement>) {
return (
<input
{...props}
disabled={!IS_BROWSER || props.disabled}
class={`px-3 py-2 bg-white rounded border(gray-500 2) disabled:(opacity-50 cursor-not-allowed) ${
props.class ?? ""
}`}
/>
);
}