Commit 3908e64e by Johannes Schill

react-panel: Use correct type for children prop to avoid the use of fragments <></>

parent 13d0a117
import React, { PureComponent } from 'react';
import React, { PureComponent, ReactNode } from 'react';
import ClipboardJS from 'clipboard';
interface Props {
......@@ -7,7 +7,7 @@ interface Props {
onSuccess?: (evt: any) => void;
onError?: (evt: any) => void;
className?: string;
children?: JSX.Element | string;
children?: ReactNode;
}
export class CopyToClipboard extends PureComponent<Props> {
......
......@@ -211,9 +211,7 @@ export class QueryInspector extends PureComponent<Props, State> {
text={this.getTextForClipboard}
onSuccess={this.onClipboardSuccess}
>
<>
<i className="fa fa-clipboard" /> Copy to Clipboard
</>
<i className="fa fa-clipboard" /> Copy to Clipboard
</CopyToClipboard>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment