Upgrade to Flow 0.71

This commit is contained in:
Tom Moor
2018-05-05 16:16:08 -07:00
parent 4a4f9f7107
commit 518015f55b
256 changed files with 23205 additions and 3658 deletions

View File

@@ -1,22 +1,20 @@
// @flow
import React, { PureComponent } from 'react';
import * as React from 'react';
import copy from 'copy-to-clipboard';
type Props = {
text: string,
children?: React.Element<any>,
children?: React.Node,
onClick?: () => void,
onCopy: () => void,
};
class CopyToClipboard extends PureComponent {
props: Props;
onClick = (ev: SyntheticEvent) => {
class CopyToClipboard extends React.PureComponent<Props> {
onClick = (ev: SyntheticEvent<*>) => {
const { text, onCopy, children } = this.props;
const elem = React.Children.only(children);
copy(text, {
debug: __DEV__,
debug: !!__DEV__,
});
if (onCopy) onCopy();