import { css } from '@emotion/css'; import { GrafanaTheme2 } from '@grafana/data'; import { useStyles2 } from '@grafana/ui'; import { Trans } from 'app/core/internationalization'; import { Node } from './types'; export interface ScopesTreeHeadlineProps { anyChildExpanded: boolean; query: string; resultsNodes: Node[]; } export function ScopesTreeHeadline({ anyChildExpanded, query, resultsNodes }: ScopesTreeHeadlineProps) { const styles = useStyles2(getStyles); if (anyChildExpanded) { return null; } return (
{!query ? ( Recommended ) : resultsNodes.length === 0 ? ( No results found for your query ) : ( Results )}
); } const getStyles = (theme: GrafanaTheme2) => { return { container: css({ color: theme.colors.text.secondary, margin: theme.spacing(1, 0), }), }; };