Skip to content

Commit a85ba2b

Browse files
authored
[ES|QL] Inline editing flyout styles (#179953)
## Summary The EuiThemeProvider messes up with our custom styles for some reason. I am using the kibanaThemeProvider which is used across Lens and doesnt create the problem ![image (31)](https://github.com/elastic/kibana/assets/17003240/e6a16840-8beb-4a89-bc97-e97608fe5210) ![image (30)](https://github.com/elastic/kibana/assets/17003240/5f1f2041-9859-4164-8f21-c2c42e492cad)
1 parent 2c40589 commit a85ba2b

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/get_edit_lens_configuration.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
*/
77

88
import React, { useCallback, useState } from 'react';
9-
import { EuiFlyout, EuiLoadingSpinner, EuiOverlayMask, EuiThemeProvider } from '@elastic/eui';
9+
import { EuiFlyout, EuiLoadingSpinner, EuiOverlayMask } from '@elastic/eui';
1010
import { i18n } from '@kbn/i18n';
1111
import { I18nProvider } from '@kbn/i18n-react';
1212
import { Provider } from 'react-redux';
1313
import type { MiddlewareAPI, Dispatch, Action } from '@reduxjs/toolkit';
1414
import { css } from '@emotion/react';
1515
import type { CoreStart } from '@kbn/core/public';
16-
import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public';
16+
import { KibanaContextProvider, KibanaThemeProvider } from '@kbn/kibana-react-plugin/public';
1717
import { isEqual } from 'lodash';
1818
import { RootDragDropProvider } from '@kbn/dom-drag-drop';
1919
import type { LensPluginStartDependencies } from '../../../plugin';
@@ -99,7 +99,6 @@ export async function getEditLensConfiguration(
9999
startDependencies,
100100
getLensAttributeService(coreStart, startDependencies)
101101
);
102-
const theme = coreStart.theme.getTheme();
103102

104103
return ({
105104
attributes,
@@ -224,15 +223,15 @@ export async function getEditLensConfiguration(
224223

225224
return getWrapper(
226225
<Provider store={lensStore}>
227-
<EuiThemeProvider colorMode={theme.darkMode ? 'dark' : 'light'}>
226+
<KibanaThemeProvider theme$={coreStart.theme.theme$}>
228227
<I18nProvider>
229228
<KibanaContextProvider services={lensServices}>
230229
<RootDragDropProvider>
231230
<LensEditConfigurationFlyout {...configPanelProps} />
232231
</RootDragDropProvider>
233232
</KibanaContextProvider>
234233
</I18nProvider>
235-
</EuiThemeProvider>
234+
</KibanaThemeProvider>
236235
</Provider>
237236
);
238237
};

0 commit comments

Comments
 (0)