"Copy to clipboard button" for your code snippets
npm install react-codecopy

!Last version

> "Copy to clipboard" button for your code snippets. Inspired in codecopy.
``bash`
$ npm install react-codecopy --save
`jsx
import CodeCopy from 'react-codecopy'
const PreCode = props => (
const Code = ({ theme, ...props } = {}) => (
)
return (
{
}
)
`
#### options
##### iconComponent
Type: componentClipboardIcon
Default:
The clipboard icont to use.
##### text
Type: string
The text to be copied.
##### onCopy
Type: function
A function to be called after text is being copied to the clipboard.
##### copy
Type: functiontext => navigator.clipboard.writeText(text)
Default:
The clipboard method to delegate into the copy action.
In case you need to support old browser, consider to call copee.
##### theme
Type: stringlight
Default:
It determines the theme to be used, being possible 'light' and 'dark'`.
- codecopy – "Copy to clipboard" button for your code snippets.
react-codecopy © Kiko Beats, released under the MIT License.
Authored and maintained by Kiko Beats with help from contributors.
> kikobeats.com · GitHub Kiko Beats · Twitter @Kikobeats