mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Fix more strict typescript errors (#35514)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import React from 'react';
|
||||
import { QueryEditorHelpProps, DataQuery } from '@grafana/data';
|
||||
import { QueryEditorHelpProps } from '@grafana/data';
|
||||
import { PromQuery } from '../types';
|
||||
|
||||
const CHEAT_SHEET_ITEMS = [
|
||||
{
|
||||
@@ -25,7 +26,7 @@ const CHEAT_SHEET_ITEMS = [
|
||||
},
|
||||
];
|
||||
|
||||
const PromCheatSheet = (props: QueryEditorHelpProps) => (
|
||||
const PromCheatSheet = (props: QueryEditorHelpProps<PromQuery>) => (
|
||||
<div>
|
||||
<h2>PromQL Cheat Sheet</h2>
|
||||
{CHEAT_SHEET_ITEMS.map((item, index) => (
|
||||
@@ -34,7 +35,7 @@ const PromCheatSheet = (props: QueryEditorHelpProps) => (
|
||||
{item.expression ? (
|
||||
<div
|
||||
className="cheat-sheet-item__example"
|
||||
onClick={(e) => props.onClickExample({ refId: 'A', expr: item.expression } as DataQuery)}
|
||||
onClick={(e) => props.onClickExample({ refId: 'A', expr: item.expression })}
|
||||
>
|
||||
<code>{item.expression}</code>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user