diff --git a/packages/grafana-ui/src/components/Badge/Badge.tsx b/packages/grafana-ui/src/components/Badge/Badge.tsx index 59cd9074a2d..fbb2fecb085 100644 --- a/packages/grafana-ui/src/components/Badge/Badge.tsx +++ b/packages/grafana-ui/src/components/Badge/Badge.tsx @@ -10,6 +10,7 @@ import { useStyles2 } from '../../themes/ThemeContext'; import { IconName } from '../../types'; import { SkeletonComponent, attachSkeleton } from '../../utils/skeleton'; import { Icon } from '../Icon/Icon'; +import { PopoverContent } from '../Tooltip'; import { Tooltip } from '../Tooltip/Tooltip'; export type BadgeColor = 'blue' | 'red' | 'green' | 'orange' | 'purple' | 'darkgrey'; @@ -18,7 +19,7 @@ export interface BadgeProps extends HTMLAttributes { text: React.ReactNode; color: BadgeColor; icon?: IconName; - tooltip?: string; + tooltip?: PopoverContent; } const BadgeComponent = React.memo(({ icon, color, text, tooltip, className, ...otherProps }) => { diff --git a/public/app/features/plugins/components/PluginStateInfo.tsx b/public/app/features/plugins/components/PluginStateInfo.tsx index bfeee14702d..5857f268ad8 100644 --- a/public/app/features/plugins/components/PluginStateInfo.tsx +++ b/public/app/features/plugins/components/PluginStateInfo.tsx @@ -17,7 +17,8 @@ export const PluginStateInfo = (props: Props) => { diff --git a/public/app/features/query/components/QueryEditorRow.tsx b/public/app/features/query/components/QueryEditorRow.tsx index aabd88e681f..73904500b4e 100644 --- a/public/app/features/query/components/QueryEditorRow.tsx +++ b/public/app/features/query/components/QueryEditorRow.tsx @@ -34,7 +34,7 @@ import { usePluginComponents, } from '@grafana/runtime'; import { DataQuery } from '@grafana/schema'; -import { Badge, ErrorBoundaryAlert } from '@grafana/ui'; +import { Badge, ErrorBoundaryAlert, List } from '@grafana/ui'; import { OperationRowHelp } from 'app/core/components/QueryOperationRow/OperationRowHelp'; import { QueryOperationAction, @@ -424,7 +424,8 @@ export class QueryEditorRow extends PureComponent warning.text).join('\n'); + const listItems = uniqueWarnings.map((warning) => warning.text); + const serializedWarnings = <>{item}} />; return (