13 lines
473 B
TypeScript
13 lines
473 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={`group inline-flex items-center justify-center rounded-full py-2 px-4 text-sm font-semibold focus:outline-none bg-blue-600 text-white hover:bg-blue-500 active:bg-blue-800 active:text-blue-100 ${props.class}`}
|
|
/>
|
|
);
|
|
}
|