UNPKG

1.42 kBTypeScriptView Raw
1import * as React from 'react';
2import { TooltipPosition } from '../Tooltip';
3import { PopoverPosition } from '../Popover';
4export interface ClipboardCopyButtonProps extends Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, 'ref'> {
5 /** Callback for the copy when the button is clicked */
6 onClick: (event: React.MouseEvent) => void;
7 /** Content of the copy button */
8 children: React.ReactNode;
9 /** ID of the copy button */
10 id: string;
11 /** ID of the content that is being copied */
12 textId: string;
13 /** Additional classes added to the copy button */
14 className?: string;
15 /** Exit delay on the copy button tooltip */
16 exitDelay?: number;
17 /** Entry delay on the copy button tooltip */
18 entryDelay?: number;
19 /** Max width of the copy button tooltip */
20 maxWidth?: string;
21 /** Position of the copy button tooltip */
22 position?: TooltipPosition | PopoverPosition | 'auto' | 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end';
23 /** Aria-label for the copy button */
24 'aria-label'?: string;
25 /** Variant of the copy button */
26 variant?: 'control' | 'plain';
27}
28export declare const ClipboardCopyButton: React.FunctionComponent<ClipboardCopyButtonProps>;
29//# sourceMappingURL=ClipboardCopyButton.d.ts.map
\No newline at end of file