Skip to content

Commit

Permalink
[drilldown] fix Darktheme is missing from add drilldowns panel
Browse files Browse the repository at this point in the history
  • Loading branch information
nreese committed Dec 6, 2022
1 parent 92ae81d commit d75668e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*/

import * as React from 'react';
import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public';
import { DrilldownManagerDependencies, PublicDrilldownManagerProps } from '../../types';

export type PublicDrilldownManagerComponent = React.FC<PublicDrilldownManagerProps>;
Expand Down Expand Up @@ -36,11 +37,13 @@ export const createPublicDrilldownManager = (

return (
<React.Suspense fallback={null}>
<LazyDrilldownManager
{...dependencies}
{...drilldownManagerProps}
actionFactories={filteredActionFactories}
/>
<KibanaThemeProvider theme$={dependencies.theme.theme$}>
<LazyDrilldownManager
{...dependencies}
{...drilldownManagerProps}
actionFactories={filteredActionFactories}
/>
</KibanaThemeProvider>
</React.Suspense>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import { ToastsStart } from '@kbn/core/public';
import { IStorageWrapper } from '@kbn/kibana-utils-plugin/public';
import { Trigger } from '@kbn/ui-actions-plugin/public';
import type { ThemeServiceStart } from '@kbn/core-theme-browser';
import {
ActionFactory,
BaseActionFactoryContext,
Expand Down Expand Up @@ -160,4 +161,9 @@ export interface DrilldownManagerDependencies {
* Link to trigger picker user facing docs on corporate website.
*/
triggerPickerDocsLink?: string;

/**
* Kibana theme service
*/
theme: ThemeServiceStart;
}
1 change: 1 addition & 0 deletions src/plugins/ui_actions_enhanced/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ export class AdvancedUiActionsPublicPlugin
toastService: core.notifications.toasts,
docsLink: core.docLinks.links.dashboard.drilldowns,
triggerPickerDocsLink: core.docLinks.links.dashboard.drilldownsTriggerPicker,
theme: core.theme,
}),
};
}
Expand Down

0 comments on commit d75668e

Please sign in to comment.