import type { TimeValue } from '../format.js'; import { type ButtonSize, type ButtonVariant } from './buttonClasses.js'; export interface RefreshButtonProps { /** May return a promise; the button spins until it settles. A rejection only * stops the spinning, so report a failure from the handler. */ onRefresh: () => unknown; /** Spins for a refresh the host tracks itself, such as a revalidation. */ refreshing?: boolean | undefined; /** When the data was last fetched: a Date, epoch milliseconds, an ISO string or a luxon * DateTime. The button then reads "Updated 5 seconds ago" instead of "Refresh", and * keeps that current. */ updatedAt?: TimeValue; size?: ButtonSize | undefined; /** A button's look, `ghost` by default; `inline` is text-sized muted text with no box, for * a line of details such as a header's "Updated 2 minutes ago". */ variant?: ButtonVariant | 'inline' | undefined; /** Only the icon shows, with "Refresh" as its name and tooltip. `phone` shows the label on a * wider screen and only the icon on a phone, the label still its name for a screen reader. */ iconOnly?: boolean | 'phone' | undefined; className?: string | undefined; } /** Fetches again on demand, and says so while it does, out loud too. */ export declare function RefreshButton({ onRefresh, refreshing, updatedAt, size, variant, iconOnly, className, }: RefreshButtonProps): import("react").JSX.Element;