13 lines
312 B
TypeScript
13 lines
312 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}
|
||
|
class="px-2 py-1 border(gray-100 2) hover:bg-gray-200"
|
||
|
/>
|
||
|
);
|
||
|
}
|