diff --git a/examples/embeddable_examples/public/react_embeddables/eui_markdown/eui_markdown_react_embeddable.tsx b/examples/embeddable_examples/public/react_embeddables/eui_markdown/eui_markdown_react_embeddable.tsx index 2ad9cd639a22..7c262d744a55 100644 --- a/examples/embeddable_examples/public/react_embeddables/eui_markdown/eui_markdown_react_embeddable.tsx +++ b/examples/embeddable_examples/public/react_embeddables/eui_markdown/eui_markdown_react_embeddable.tsx @@ -7,7 +7,7 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -import { EuiMarkdownEditor, EuiMarkdownFormat } from '@elastic/eui'; +import { EuiMarkdownEditor, EuiMarkdownFormat, useEuiTheme } from '@elastic/eui'; import { css } from '@emotion/react'; import { ReactEmbeddableFactory } from '@kbn/embeddable-plugin/public'; import { i18n } from '@kbn/i18n'; @@ -16,7 +16,6 @@ import { useInheritedViewMode, useStateFromPublishingSubject, } from '@kbn/presentation-publishing'; -import { euiThemeVars } from '@kbn/ui-theme'; import React from 'react'; import { BehaviorSubject } from 'rxjs'; import { EUI_MARKDOWN_ID } from './constants'; @@ -80,6 +79,7 @@ export const markdownEmbeddableFactory: ReactEmbeddableFactory< // get state for rendering const content = useStateFromPublishingSubject(content$); const viewMode = useInheritedViewMode(api) ?? 'view'; + const { euiTheme } = useEuiTheme(); return viewMode === 'edit' ? ( {content ?? ''} diff --git a/examples/embeddable_examples/public/react_embeddables/field_list/field_list_react_embeddable.tsx b/examples/embeddable_examples/public/react_embeddables/field_list/field_list_react_embeddable.tsx index c6b13d241997..c88219d1fafc 100644 --- a/examples/embeddable_examples/public/react_embeddables/field_list/field_list_react_embeddable.tsx +++ b/examples/embeddable_examples/public/react_embeddables/field_list/field_list_react_embeddable.tsx @@ -7,7 +7,7 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, useEuiTheme } from '@elastic/eui'; import { css } from '@emotion/react'; import type { Reference } from '@kbn/content-management-utils'; import { CoreStart } from '@kbn/core-lifecycle-browser'; @@ -17,7 +17,6 @@ import { ReactEmbeddableFactory } from '@kbn/embeddable-plugin/public'; import { i18n } from '@kbn/i18n'; import { initializeTitles, useBatchedPublishingSubjects } from '@kbn/presentation-publishing'; import { LazyDataViewPicker, withSuspense } from '@kbn/presentation-util-plugin/public'; -import { euiThemeVars } from '@kbn/ui-theme'; import { UnifiedFieldListSidebarContainer, type UnifiedFieldListSidebarContainerProps, @@ -150,6 +149,7 @@ export const getFieldListFactory = ( dataViews$, selectedFieldNames$ ); + const { euiTheme } = useEuiTheme(); const selectedDataView = renderDataViews?.[0]; @@ -165,7 +165,7 @@ export const getFieldListFactory = ( { bookAttributesManager.bookTitle, bookAttributesManager.bookSynopsis ); + const { euiTheme } = useEuiTheme(); return (
{ )}
{ api, Component: () => { const [count, error] = useBatchedPublishingSubjects(count$, blockingError$); + const { euiTheme } = useEuiTheme(); useEffect(() => { return () => { @@ -138,7 +138,7 @@ export const getSearchEmbeddableFactory = (services: Services) => {