-
Notifications
You must be signed in to change notification settings - Fork 349
/
ClipboardCopy.d.ts
30 lines (26 loc) · 986 Bytes
/
ClipboardCopy.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { ClipboardEvent, FunctionComponent, HTMLProps, ReactNode } from 'react';
import { OneOf, Omit } from '../../helpers/typeUtils';
import { PopoverPosition } from '../Popover';
export enum ClipboardCopyVariant {
inline = 'inline',
expansion = 'expansion'
}
export interface ClipboardCopyProps extends Omit<HTMLProps<HTMLDivElement>, 'onChange'> {
className?: string;
hoverTip?: string;
clickTip?: string;
textAriaLabel?: string;
toggleAriaLabel?: string;
isReadOnly?: boolean;
variant?: OneOf<typeof ClipboardCopyVariant, keyof typeof ClipboardCopyVariant>;
position?: OneOf<typeof PopoverPosition, keyof typeof PopoverPosition>;
maxWidth?: string;
exitDelay?: number;
entryDelay?: number;
switchDelay?: number;
onCopy?: (event: ClipboardEvent<HTMLDivElement>, text?: string) => void;
onChange?: (text?: string) => void;
children?: ReactNode;
}
declare const ClipboardCopy: FunctionComponent<ClipboardCopyProps>;
export default ClipboardCopy;