ClipboardButton
Used to easily copy content.
Click here to copy your content.
Props:
content
Description: Content to copy. Type: String. Required.
copiedFeedbackMessage
Description: Message to display when content was copied. Type: String. Required.
notCopiedFeedbackMessage
Description: Message to display when content is not copied yet. Type: String. Required.
onCopy
Description: Callback function invoked after component was copied. Type: Function.
style
Description: ClipboardButton style. Type: CSS Properties.
className
Description: ClipboardButton className. Type: String.
iconStyle
Description: Icon style. Type: CSS Properties.
iconClassName
Description: Icon className. Type: String.
Code
<ClipboardButton content={myContent} copiedFeedbackMessage='Copied!' notCopiedFeedbackMessage='Click here to copy your content.' onCopy={() => toast.success('Content copied!')} />