diff --git a/src/plugins/discover/public/application/main/components/top_nav/get_top_nav_links.tsx b/src/plugins/discover/public/application/main/components/top_nav/get_top_nav_links.tsx index c72c0539fc593..23e7176cb2845 100644 --- a/src/plugins/discover/public/application/main/components/top_nav/get_top_nav_links.tsx +++ b/src/plugins/discover/public/application/main/components/top_nav/get_top_nav_links.tsx @@ -81,6 +81,7 @@ export const getTopNavLinks = ({ run: async (anchorElement: HTMLElement) => { openAlertsPopover({ I18nContext: services.core.i18n.Context, + theme$: services.core.theme.theme$, anchorElement, searchSource: savedSearch.searchSource, services, diff --git a/src/plugins/discover/public/application/main/components/top_nav/open_alerts_popover.tsx b/src/plugins/discover/public/application/main/components/top_nav/open_alerts_popover.tsx index bf484452b731f..18a4922a908b5 100644 --- a/src/plugins/discover/public/application/main/components/top_nav/open_alerts_popover.tsx +++ b/src/plugins/discover/public/application/main/components/top_nav/open_alerts_popover.tsx @@ -8,11 +8,12 @@ import React, { useCallback, useState, useMemo } from 'react'; import ReactDOM from 'react-dom'; -import { I18nStart } from '@kbn/core/public'; +import type { Observable } from 'rxjs'; +import type { CoreTheme, I18nStart } from '@kbn/core/public'; import { EuiWrappingPopover, EuiContextMenu } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import type { DataView, ISearchSource } from '@kbn/data-plugin/common'; -import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; +import { KibanaContextProvider, KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; import { DiscoverServices } from '../../../../build_services'; import { updateSearchSource } from '../../utils/update_search_source'; @@ -177,6 +178,7 @@ function closeAlertsPopover() { export function openAlertsPopover({ I18nContext, + theme$, anchorElement, searchSource, services, @@ -185,6 +187,7 @@ export function openAlertsPopover({ updateDataViewList, }: { I18nContext: I18nStart['Context']; + theme$: Observable; anchorElement: HTMLElement; searchSource: ISearchSource; services: DiscoverServices; @@ -203,16 +206,18 @@ export function openAlertsPopover({ const element = ( - + + + );