react-copy-to-clipboard: missing onCopy method

This commit is contained in:
Meno Abels
2017-03-05 15:06:39 +01:00
parent b521e2441c
commit 039dbf1bdb
3 changed files with 5 additions and 4 deletions
+1
View File
@@ -19,6 +19,7 @@ declare namespace CopyToClipboard {
export interface Props {
text: string;
onCopy: (a: string) => void,
options?: Options;
}
@@ -1,12 +1,12 @@
import * as React from "react";
import CopyToClipboard from "react-copy-to-clipboard";
import * as CopyToClipboard from "react-copy-to-clipboard";
export class Test extends React.Component<any, any> {
render() {
return (
<CopyToClipboard text={"Hello World"}
onCopy={() => this.setState({copied: true})}>
onCopy={() => {}}>
<span>Copy to clipboard with span</span>
</CopyToClipboard>
);
+2 -2
View File
@@ -9,13 +9,13 @@
"noImplicitThis": true,
"strictNullChecks": true,
"baseUrl": "../",
"jsx": "react",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true,
"jsx": "react"
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",