import { EuiPageTemplate } from '@elastic/eui' ; import React , { ComponentType } from 'react' ; import { MemoryRouter } from 'react-router-dom' ; import { CoreStart } from '../../../../../../src/core/public' ; import { createKibanaReactContext } from '../../../../../../src/plugins/kibana_react/public' ; import { PluginContext , PluginContextValue } from '../../context/plugin_context' ; import { LandingPage } from './' ; export default { title : 'app/Landing' , component : LandingPage , decorators : [ ( Story ) => { const KibanaReactContext = createKibanaReactContext ( { application : { getUrlForApp : ( ) => '' , navigateToUrl : ( ) => { } } , chrome : { docTitle : { change : ( ) => { } } , setBreadcrumbs : ( ) => { } } , uiSettings : { get : ( ) => true } , observability : { ObservabilityPageTemplate : EuiPageTemplate } , } as unknown as Partial < CoreStart > ) ; const pluginContextValue = { appMountParameters : { setHeaderActionMenu : ( ) => { } } , core : { http : { basePath : { prepend : ( ) => '' , } , } , docLinks : { links : { observability : { guide : 'alink' , } , } , } , } , ObservabilityPageTemplate : EuiPageTemplate , } as unknown as PluginContextValue ; return ( < MemoryRouter > < KibanaReactContext . Provider > < PluginContext . Provider value = { pluginContextValue } > < Story /> < /PluginContext.Provider> < /KibanaReactContext.Provider> < /MemoryRouter>); } , ] , } ; export function Example ( ) { return < LandingPage />; }