import { type ComponentPropsWithRef, type ReactNode } from 'react'; import { type AppLinkProps } from './AppLink.js'; import { type ButtonSize, type ButtonVariant } from './buttonClasses.js'; interface IconButtonOwnProps { icon: ReactNode; /** The accessible name, also shown as the tooltip. */ label: string; variant?: ButtonVariant; size?: ButtonSize; /** A toggle's state: set, it reads as pressed (`aria-pressed`). */ pressed?: boolean | undefined; /** A dot in the corner, such as for filters narrowing what the page shows. It * is only seen, so say what it means in `label` too, such as "Filters (2 on)". */ dot?: boolean; /** A single key, such as F, that presses the button from anywhere on the page * outside a text field. Also shown in the tooltip. Off with UIProvider's * `characterKeyShortcuts`. */ shortcut?: string | undefined; } /** With `href` it is a link that looks like the button, for navigation. */ export type IconButtonProps = IconButtonOwnProps & ((ComponentPropsWithRef<'button'> & { href?: undefined; }) | (Omit & { href: string; })); /** A button that shows only an icon, named by its tooltip, or with `href` a * link that looks like one. It can be a popup's trigger: it passes the * trigger's props and ref on, and hides its tooltip while the popup is open. */ export declare function IconButton({ icon, label, variant, size, pressed, dot, shortcut: givenShortcut, className, ref, ...props }: IconButtonProps): import("react").JSX.Element; export {};