The Copy Wrapper component can be used by importing { CopyWrapper } from "finallyreact"
CopyWrapper can be wrapped around a component and will show a copy icon on hover. Clicking the icon will copy provided text to the user's clipboard.
The Copy Wrapper component can be used by importing { CopyWrapper } from "finallyreact"
CopyWrapper can be wrapped around a component and will show a copy icon on hover. Clicking the icon will copy provided text to the user's clipboard.
Prop Name | Prop Type | Description |
---|---|---|
children | React.ReactNode | Content to be wrapped by the copy wrapper |
color | string | Color for the copy icon |
copyText | string | Text to be copied when the copy icon is clicked |
hidden | boolean | Hides the copy icon |
iconProps | HTMLAttributes | Props for the copy icon |
location | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | Location of the copy icon |
popProps | PopWrapper | Props for the PopWrapper component |
showIcon | boolean | Whether to show the copy icon |
simple | boolean | Simple copy wrapper with minimal styles |