Component for clip-to-copy
$ npm install the-copyboard --save
'use strict'
import React from 'react'
import { TheCopyboard, TheCopyboardStyle } from 'the-copyboard'
class ExampleComponent extends React.PureComponent {
render () {
return (
<div>
<TheCopyboardStyle/>
<TheCopyboard text='http://example.com/foo/bar?t=1234qwerasdfzxcv'
tipText='Copied to your clip board'
>
</TheCopyboard>
</div>
)
}
}
export default ExampleComponent
Component for clip-to-copy
Props
Name | Type | Description | Default |
---|---|---|---|
text |
string | Text to show | `` |
tipDuration |
number | Duration to shows tip | 800 |
tipText |
string | Text for tip | 'Copied' |
href |
null |
Style for TheCopyboard
Props
Name | Type | Description | Default |
---|---|---|---|
options |
object | Style options | {} |
This software is released under the MIT License.