diff options
Diffstat (limited to 'components')
-rw-r--r-- | components/Button.tsx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/components/Button.tsx b/components/Button.tsx new file mode 100644 index 0000000..0d10b4b --- /dev/null +++ b/components/Button.tsx @@ -0,0 +1,11 @@ +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} + /> + ); +} |