Files
sweet/www/components/gallery/Input.tsx
T
2022-11-07 22:24:32 +09:00

15 lines
396 B
TypeScript

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 ?? ""
}`}
/>
);
}