mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[Files] Use React theme provider in the files management section (#159504)
## Summary Closes https://github.com/elastic/kibana/issues/159154 Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
16193c6544
commit
8e5440ef03
1 changed files with 21 additions and 19 deletions
|
@ -10,7 +10,7 @@ import React from 'react';
|
|||
import ReactDOM from 'react-dom';
|
||||
import { Router } from 'react-router-dom';
|
||||
import { Route } from '@kbn/shared-ux-router';
|
||||
import { toMountPoint } from '@kbn/kibana-react-plugin/public';
|
||||
import { KibanaThemeProvider, toMountPoint } from '@kbn/kibana-react-plugin/public';
|
||||
import { I18nProvider, FormattedRelative } from '@kbn/i18n-react';
|
||||
import type { CoreStart } from '@kbn/core/public';
|
||||
import type { ManagementAppMountParams } from '@kbn/management-plugin/public';
|
||||
|
@ -36,25 +36,27 @@ export const mountManagementSection = (
|
|||
|
||||
ReactDOM.render(
|
||||
<I18nProvider>
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<TableListViewKibanaProvider
|
||||
{...{
|
||||
core: coreStart as unknown as TableListViewKibanaDependencies['core'],
|
||||
toMountPoint,
|
||||
FormattedRelative,
|
||||
}}
|
||||
>
|
||||
<FilesManagementAppContextProvider
|
||||
filesClient={filesClientFactory.asUnscoped()}
|
||||
getFileKindDefinition={getFileKindDefinition}
|
||||
getAllFindKindDefinitions={getAllFindKindDefinitions}
|
||||
<KibanaThemeProvider theme$={coreStart.theme.theme$}>
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<TableListViewKibanaProvider
|
||||
{...{
|
||||
core: coreStart as unknown as TableListViewKibanaDependencies['core'],
|
||||
toMountPoint,
|
||||
FormattedRelative,
|
||||
}}
|
||||
>
|
||||
<Router history={history}>
|
||||
<Route path="/" component={App} />
|
||||
</Router>
|
||||
</FilesManagementAppContextProvider>
|
||||
</TableListViewKibanaProvider>
|
||||
</QueryClientProvider>
|
||||
<FilesManagementAppContextProvider
|
||||
filesClient={filesClientFactory.asUnscoped()}
|
||||
getFileKindDefinition={getFileKindDefinition}
|
||||
getAllFindKindDefinitions={getAllFindKindDefinitions}
|
||||
>
|
||||
<Router history={history}>
|
||||
<Route path="/" component={App} />
|
||||
</Router>
|
||||
</FilesManagementAppContextProvider>
|
||||
</TableListViewKibanaProvider>
|
||||
</QueryClientProvider>
|
||||
</KibanaThemeProvider>
|
||||
</I18nProvider>,
|
||||
element
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue