import type { FC, MouseEvent } from "react"; import type { IconButtonProps } from "../../Actions/IconButton/IconButton"; import type { IconComponentType } from "../../Icons"; export declare const RESET_STATUS_DELAY = 100; export type IconButtonWithFeedbackLocale = { /** * The tooltip message shown after a successful click. * @default "Success" */ success?: string; /** * The tooltip message shown after an error occurs in the `onClick` handler. * @default "Something went wrong" */ error?: string; /** * The tooltip message shown while the action is loading. * @default "Loading..." */ loading?: string; }; export type IconButtonWithFeedbackProps = Omit & { /** * The icon to display when the action succeeds. * Set to `false` to disable the success icon. * @default CheckIcon */ successIcon?: IconComponentType | false; /** * The icon to display when the action fails. * Set to `false` to disable the error icon. * @default AlertTriangleIcon */ errorIcon?: IconComponentType | false; /** * The tooltip message shown by default. */ message: string; /** * The locale for the tooltip messages. */ locale?: IconButtonWithFeedbackLocale; /** * How long to show the success message tooltip (ms). * @default 1000 */ tooltipSuccessMessageDuration?: number; /** * How long to show the error message tooltip (ms). * @default 2000 */ tooltipErrorMessageDuration?: number; /** * Called when the button is clicked. * Can be async. */ onClick?: (evt: MouseEvent) => Promise | void; /** * Called when an error occurs during `onClick`. */ onError?: (error: unknown) => void; }; /** * A compact, icon-only button that displays contextual tooltips on hover and click, enhancing user understanding and confirmation. * * See the [IconButtonWithFeedback documentation page](https://zeroheight.com/8261d6576/p/70da74-icon-button-with-feedback) for more information. */ export declare const IconButtonWithFeedback: FC;