diff --git a/packages/react/kibana_context/render/render_provider.tsx b/packages/react/kibana_context/render/render_provider.tsx index a597311c0e17a..233abb42834b9 100644 --- a/packages/react/kibana_context/render/render_provider.tsx +++ b/packages/react/kibana_context/render/render_provider.tsx @@ -25,9 +25,13 @@ export type KibanaRenderContextProviderProps = Omit > = ({ children, ...props }) => { + const { analytics, i18n, theme, userProfile, colorMode, modify } = props; return ( - - + + {children} diff --git a/packages/react/kibana_context/root/root_provider.test.tsx b/packages/react/kibana_context/root/root_provider.test.tsx index 312b366797a36..405823a9b823c 100644 --- a/packages/react/kibana_context/root/root_provider.test.tsx +++ b/packages/react/kibana_context/root/root_provider.test.tsx @@ -15,8 +15,6 @@ import { useEuiTheme } from '@elastic/eui'; import type { UseEuiTheme } from '@elastic/eui'; import { mountWithIntl } from '@kbn/test-jest-helpers'; import type { KibanaTheme } from '@kbn/react-kibana-context-common'; -import type { AnalyticsServiceStart } from '@kbn/core-analytics-browser'; -import { analyticsServiceMock } from '@kbn/core-analytics-browser-mocks'; import { i18nServiceMock } from '@kbn/core-i18n-browser-mocks'; import { I18nStart } from '@kbn/core-i18n-browser'; import type { UserProfileService } from '@kbn/core-user-profile-browser'; @@ -26,12 +24,10 @@ import { KibanaRootContextProvider } from './root_provider'; describe('KibanaRootContextProvider', () => { let euiTheme: UseEuiTheme | undefined; let i18nMock: I18nStart; - let analytics: AnalyticsServiceStart; let userProfile: UserProfileService; beforeEach(() => { euiTheme = undefined; - analytics = analyticsServiceMock.createAnalyticsServiceStart(); i18nMock = i18nServiceMock.createStartContract(); userProfile = userProfileServiceMock.createStart(); }); @@ -66,7 +62,6 @@ describe('KibanaRootContextProvider', () => { const wrapper = mountWithIntl( { const wrapper = mountWithIntl( {children}; } else { + const { theme, userProfile, globalStyles, colorMode, modify } = props; return ( - + {children} ); diff --git a/packages/react/kibana_context/root/tsconfig.json b/packages/react/kibana_context/root/tsconfig.json index 6c67c97861c11..a7606025552b8 100644 --- a/packages/react/kibana_context/root/tsconfig.json +++ b/packages/react/kibana_context/root/tsconfig.json @@ -22,7 +22,6 @@ "@kbn/core-i18n-browser", "@kbn/core-base-common", "@kbn/core-analytics-browser", - "@kbn/core-analytics-browser-mocks", "@kbn/core-user-profile-browser", "@kbn/core-user-profile-browser-mocks", ]