import { ButtonHTMLAttributes } from "preact";
import { IS_BROWSER } from "fresh/runtime";

export function Button(props: ButtonHTMLAttributes<HTMLButtonElement>) {
  return (
    <button
      {...props}
      disabled={!IS_BROWSER || props.disabled}
      class={`px-2 py-1  ${props.class ? props.class : " "}`}
    />
  );
}
