import React from 'react'; import { TooltipProps } from '@contentful/f36-tooltip'; import { ButtonProps } from '@contentful/f36-button'; type CopyButtonProps = Omit & { /** * Function that gets called when the button is clicked */ onCopy?: (string: any) => void; /** * Text to be shown when the button is clicked * @default Copied! */ tooltipCopiedText?: string; /** * Text to be shown when button is hovered or focused * @default Copy to clipboard */ tooltipText?: string; /** * Props that are passed to the tooltip component */ tooltipProps?: Omit; /** * Label to be used on aria-label for the button * @default Copy to clipboard */ label?: string; /** * Allows to disable the copy button, when true the tooltip would not be shown * @default false */ isDisabled?: boolean; /** * Allows setting size of the copy button to small * @default medium */ size?: 'small' | 'medium'; /** * Value that will be copied to clipboard when the button is clicked */ value: string; }; declare const CopyButton: React.ForwardRefExoticComponent & { /** * Function that gets called when the button is clicked */ onCopy?: (string: any) => void; /** * Text to be shown when the button is clicked * @default Copied! */ tooltipCopiedText?: string; /** * Text to be shown when button is hovered or focused * @default Copy to clipboard */ tooltipText?: string; /** * Props that are passed to the tooltip component */ tooltipProps?: Omit; /** * Label to be used on aria-label for the button * @default Copy to clipboard */ label?: string; /** * Allows to disable the copy button, when true the tooltip would not be shown * @default false */ isDisabled?: boolean; /** * Allows setting size of the copy button to small * @default medium */ size?: "small" | "medium"; /** * Value that will be copied to clipboard when the button is clicked */ value: string; } & React.RefAttributes>; export { CopyButton, type CopyButtonProps };