From 7c70868efea45f890608f148dff5cabd4a407dd2 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Wed, 6 Nov 2024 15:00:12 +1100 Subject: [PATCH] [8.x] [Expamples][Guided onboarding] - added missing EuiProvider to fix errors (#199070) (#199076) # Backport This will backport the following commits from `main` to `8.x`: - [[Expamples][Guided onboarding] - added missing EuiProvider to fix errors (#199070)](https://github.com/elastic/kibana/pull/199070) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) Co-authored-by: Philippe Oberti --- .../public/application.tsx | 16 ++- .../public/components/app.tsx | 111 +++++++++--------- .../guided_onboarding_example/tsconfig.json | 1 + 3 files changed, 65 insertions(+), 63 deletions(-) diff --git a/examples/guided_onboarding_example/public/application.tsx b/examples/guided_onboarding_example/public/application.tsx index 1227b8e7271df..b3d67e9de630a 100755 --- a/examples/guided_onboarding_example/public/application.tsx +++ b/examples/guided_onboarding_example/public/application.tsx @@ -10,20 +10,24 @@ import React from 'react'; import ReactDOM from 'react-dom'; import { AppMountParameters, CoreStart } from '@kbn/core/public'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { AppPluginStartDependencies } from './types'; import { GuidedOnboardingExampleApp } from './components/app'; export const renderApp = ( - { notifications }: CoreStart, + coreStart: CoreStart, { guidedOnboarding }: AppPluginStartDependencies, { element, history }: AppMountParameters ) => { + const { notifications } = coreStart; ReactDOM.render( - , + + + , element ); diff --git a/examples/guided_onboarding_example/public/components/app.tsx b/examples/guided_onboarding_example/public/components/app.tsx index 20430534a54e3..650f683e82bbb 100755 --- a/examples/guided_onboarding_example/public/components/app.tsx +++ b/examples/guided_onboarding_example/public/components/app.tsx @@ -8,11 +8,10 @@ */ import React from 'react'; -import { FormattedMessage, I18nProvider } from '@kbn/i18n-react'; +import { FormattedMessage } from '@kbn/i18n-react'; import { Routes, Router, Route } from '@kbn/shared-ux-router'; import { EuiPageTemplate } from '@elastic/eui'; import { CoreStart, ScopedHistory } from '@kbn/core/public'; - import { GuidedOnboardingPluginStart } from '@kbn/guided-onboarding-plugin/public/types'; import { StepTwo } from './step_two'; import { StepOne } from './step_one'; @@ -30,62 +29,60 @@ export const GuidedOnboardingExampleApp = (props: GuidedOnboardingExampleAppDeps const { notifications, guidedOnboarding, history } = props; return ( - - - + + + } + /> + {guidedOnboarding?.guidedOnboardingApi?.isEnabled ? ( + + + + +
+ + + + + + + + + + + + + + + + + ) : ( + + + + } + body={ +

+ +

} /> - {guidedOnboarding?.guidedOnboardingApi?.isEnabled ? ( - - - - -
- - - - - - - - - - - - - - - - - ) : ( - - - - } - body={ -

- -

- } - /> - )} - - + )} + ); }; diff --git a/examples/guided_onboarding_example/tsconfig.json b/examples/guided_onboarding_example/tsconfig.json index 0707df0a33308..6dca87ec7eb23 100644 --- a/examples/guided_onboarding_example/tsconfig.json +++ b/examples/guided_onboarding_example/tsconfig.json @@ -17,6 +17,7 @@ "@kbn/i18n", "@kbn/guided-onboarding", "@kbn/shared-ux-router", + "@kbn/react-kibana-context-render", ], "exclude": [ "target/**/*",