mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-04 12:11:47 +00:00
react-copy-to-clipboard: missing onCopy method
This commit is contained in:
Vendored
+1
@@ -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>
|
||||
);
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user