2.0.10 • Published 5 years ago
the-copyboard v2.0.10
the-copyboard
Component for clip-to-copy
Installation
$ npm install the-copyboard --save
Usage
'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
Components
TheCopyboard
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 |
TheCopyboardStyle
Style for TheCopyboard
Props
Name | Type | Description | Default |
---|---|---|---|
options | object | Style options | {} |
License
This software is released under the MIT License.