Interface: UseClipboardProps
Properties​
copiedDuration​
• Optional
copiedDuration: number
revert back the isCopied flag to false again if a value is set.
Defined in​
disableClipboardAPI​
• Optional
disableClipboardAPI: boolean
Disables the new clipboard API navigator.clipboard
even if
it is supported.
Defined in​
Methods​
onError​
â–¸ Optional
onError(error
): void
Triggers when the hook encounters an error. If passed hook won't throw an error.
Parameters​
Name | Type |
---|---|
error | string |
Returns​
void
Defined in​
onSuccess​
â–¸ Optional
onSuccess(text
): void
It's callback function that is called after the copy
command
is executed.
Parameters​
Name | Type |
---|---|
text | string |
Returns​
void