import { ReactElement } from 'react'; export interface CopiableProps { value: string; /** @deprecated No longer has any effect; copying works inside focus traps. */ focusTrapPaused?: boolean; truncated?: boolean; onCopy?: (text: string) => void; } /** * Make some text easily copiable. * * Comes with a [CopyButton](#copybutton) that you can click to automatically * copy the text. * * Also, on wider viewports a click on the text will automatically select it * all, so you can easily copy with your favorite keyboard shortcut. */ declare function Copiable({ value, onCopy, truncated }: CopiableProps): ReactElement; declare namespace Copiable { var propTypes: { /** * The text that will be displayed and copied. */ value: any; /** * Deprecated. No longer has any effect, since copying works inside focus * traps like `Modal` without any extra configuration. */ focusTrapPaused: any; /** * If `false` (default), the text will be overflow to multiple lines, * and words longer than a single line (e.g. long access tokens or URLs) * will be broken to enforce wrapping. * * If `true`, the Copiable's text will be truncated to a single line * of text. **Only set this to `true` if you know that your target * browsers support the copy button!** Some browsers will not effectively * copy text that is truncated by CSS, so the risk is that some of your * users might have *no way* to view and copy all the text if the copy * button does not work for them. * * Horizontal scrolling is not an option because of things end up getting * pretty gross across browsers. */ truncated: any; /** * Invoked when the button is clicked. * Passed one argument: the `text` prop. */ onCopy: any; }; } export default Copiable;