import { type MouseEvent, type ReactNode } from "react"; import type { SX } from "../../theme"; import type { IconName } from "../Icon/iconNames"; export type IconButtonProps = { color?: Color; hasPadding?: boolean; hiddenLabel?: string; icon: IconName | JSX.Element; loading?: boolean; radius?: "normal" | "full"; size?: "small" | "medium" | "large"; sx?: SX; variant?: "solid" | "ghost"; disabled?: boolean; /** * The type of HTML button to render. Defaults to "button". * You may want to use "submit" for your primary form button. */ type?: "button" | "submit" | "reset"; /** * The form ID this button is associated with. */ form?: string; onClick?: (event: MouseEvent | KeyboardEvent) => void; onMouseDown?: (event: MouseEvent) => void; onMouseUp?: (event: MouseEvent) => void; } & AsChildProps; type AsChildProps = { /** * If true, children must be a valid ReactElement and it will be used as the * top level component instead of