memorium/components/Button.tsx

13 lines
313 B
TypeScript
Raw Permalink Normal View History

2023-07-26 13:47:01 +02:00
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}
2023-08-02 13:25:19 +02:00
class={`px-2 py-1 ${props.class ? props.class : " "}`}
2023-07-26 13:47:01 +02:00
/>
);
}