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 | Default value Copied | 
Prop tooltipProps#  | Description and type Optional props to pass to the EuiToolTip component. Partial<Omit<EuiToolTipProps, "children" | "content" | "onMouseOut">> | Default value  | 
Prop className#  | Description and type Type:  string | Default value  | 
Prop aria-label#  | Description and type Type:  string | Default value  | 
Prop data-test-subj#  | Description and type Type:  string | Default value  | 
Prop css#  | Description and type Type:  Interpolation<Theme> | Default value  |