import type { ComponentChildren, JSX, Ref } from "preact"; import { cx } from "./cx.ts"; export type ButtonVariant = "default" | "primary" | "danger" | "icon"; const VARIANT_CLASS: Record = { default: "sb-button", primary: "sb-button sb-button-primary", danger: "sb-button sb-button-danger", icon: "sb-button-icon", }; export type ButtonProps = Omit< JSX.IntrinsicElements["button"], "class" | "ref" > & { variant?: ButtonVariant; class?: string; /** Ref to the underlying ); }