mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
react-panel: Use correct type for children prop to avoid the use of fragments <></>
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user