Copy
The EuiCopy component is a utility for copying text to clipboard. Wrap a function that returns a component. The first argument will be a
copy
function.
Loading...
Copy to clipboard function
The function copyToClipboard
allows you to copy text to the clipboard. It receives an argument of type string
.
Loading...
Props
EuiCopy
Prop | Description and type | Default value |
---|---|---|
Prop textToCopy# | Description and type Text that will be copied to clipboard when copy function is executed. string | Default value Required |
Prop children# | Description and type Function that must return a component. First argument is 'copy' function. (copy: () => void) => ReactElement<any, string | JSXElementConstructor<any>> | Default value Required |
Prop beforeMessage# | Description and type Tooltip message displayed before copy function is called. ReactNode | Default value |
Prop afterMessage# | Description and type Tooltip message displayed after copy function is called that lets the user know that ReactNode |