add Fresh Components (#872)
This commit is contained in:
@@ -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 ?? ""
|
||||
}`}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user