ls-deno/components/Button.tsx
2022-10-01 14:03:15 -05:00

12 lines
251 B
TypeScript

import { JSX } from "preact";
import { IS_BROWSER } from "$fresh/runtime.ts";
export function Button(props: JSX.HTMLAttributes<HTMLButtonElement>) {
return (
<button
{...props}
disabled={!IS_BROWSER || props.disabled}
/>
);
}