diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2023-01-02 20:26:18 +0100 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2023-01-02 20:26:18 +0100 |
| commit | 18f7a28a7ee6e6c8a04233feac037bbf9c91b0a5 (patch) | |
| tree | 4864867f30871134d6c6a6c471a92d8affcf27d4 /components | |
feat: Init commit
Diffstat (limited to 'components')
| -rw-r--r-- | components/Button.tsx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/components/Button.tsx b/components/Button.tsx new file mode 100644 index 0000000..909d380 --- /dev/null +++ b/components/Button.tsx @@ -0,0 +1,12 @@ +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" + /> + ); +} |
