import * as React from 'react'; import { type ButtonProps } from '../button/button'; type CopyButtonValue = string | React.RefObject | (() => string | Promise); interface CopyButtonProps extends Omit { /** **Required.** What to copy: a string, an element ref (its value/textContent), or a (possibly async) getter. */ value: CopyButtonValue; /** * How long (ms) the copied state lasts before reverting. * @default 2000 */ timeout?: number; /** * Accessible name (and tooltip via `title`) in the idle state. * @default 'Copy' */ label?: string; /** * Accessible name after a successful copy; a string child also swaps to this. * @default 'Copied' */ copiedLabel?: string; /** Called with the copied text on success. */ onCopy?: (value: string) => void; /** Called if reading the value or writing to the clipboard fails. */ onCopyError?: (error: unknown) => void; } declare function CopyButton({ value, timeout, label, copiedLabel, onCopy, onCopyError, onClick, variant, size, className, children, ...props }: CopyButtonProps): React.JSX.Element; export { CopyButton }; export type { CopyButtonProps }; //# sourceMappingURL=copy-button.d.ts.map