UNPKG

@cimpress/react-components

Version:
34 lines 1.13 kB
import React, { ReactNode } from 'react'; import { PublicComponentProps } from '../types'; export interface CopyProps extends PublicComponentProps { /** * The string to copy to clipboard when button is clicked */ value: string; /** * The variant of copy component user wants to use. Button, text or inline. */ variant?: 'button' | 'text' | 'inline'; /** * Ths string to show in a Snackbar after copying is successful. */ successMessage?: string; /** * The inner contents of the button. */ children?: ReactNode; /** * Handler for when component is clicked to be copied. */ onClick?: (e: React.KeyboardEvent | React.MouseEvent) => any; /** * Text to display in tooltip when user covers over component. */ hoverText?: string; /** * How long (in milliseconds) to show the success message */ duration?: number; } export declare const Copy: ({ variant, children, value, successMessage, onClick, hoverText, duration, className, ...rest }: CopyProps) => React.JSX.Element; //# sourceMappingURL=Copy.d.ts.map