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

pull/14198/head
Johannes Schill 7 years ago
parent 13d0a11798
commit 3908e64ef0
  1. 4
      public/app/core/components/CopyToClipboard/CopyToClipboard.tsx
  2. 4
      public/app/features/dashboard/dashgrid/QueryInspector.tsx

@ -1,4 +1,4 @@
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>

Loading…
Cancel
Save