deno-fresh-saurpc-lyrics/components/Button.tsx

13 lines
412 B
TypeScript
Raw Permalink Normal View History

2024-02-18 09:57:14 -06: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}
2024-02-18 14:18:51 -06:00
class="px-2 py-1 border-gray-500 border-2 rounded bg-white hover:bg-gray-200 dark:bg-zinc-900 dark:text-zinc-100 dark:hover:bg-zinc-800 transition-colors"
2024-02-18 09:57:14 -06:00
/>
);
}