UNPKG

@wix/design-system

Version:

@wix/design-system

23 lines 1.13 kB
import { ReactNode } from 'react'; export type CopyClipboardChildrenProps = { /** A function which can be used to invoke copying to clipboard, must be triggered by the user */ copyToClipboard: () => void; /** A boolean which contains state of copying to clipboard. Default - `null`, `true`/`false` depending if copying was successful */ isCopied: boolean; /** A function to reset `isCopied` status to `null`. In case component is provided with `resetTimeout` prop, reset is invoked after a specific timeout */ reset: () => void; }; export interface CopyClipboardProps { /** Text to be added to clipboard */ value: string; /** Children render prop provides handlers to invoke copying to the clipboard */ children(params: CopyClipboardChildrenProps): ReactNode; /** Applied as data-hook HTML attribute that can be used in the tests */ dataHook?: string; className?: string; /** onCopy callback */ onCopy?: () => void; /** Interval after which state of whether value was copied is reset */ resetTimeout?: number; } //# sourceMappingURL=CopyToClipboard.types.d.ts.map