diff --git a/packages/kbn-expandable-flyout/src/index.stories.tsx b/packages/kbn-expandable-flyout/src/index.stories.tsx index e02e3de8b791a..1c10c5454b727 100644 --- a/packages/kbn-expandable-flyout/src/index.stories.tsx +++ b/packages/kbn-expandable-flyout/src/index.stories.tsx @@ -101,13 +101,17 @@ const registeredPanels = [ ]; export const Right: Story = () => { - const state = { - right: { - id: 'right', + const state: State = { + byId: { + memory: { + right: { + id: 'right', + }, + left: undefined, + preview: undefined, + }, }, - left: {}, - preview: [], - } as unknown as State; + }; return ( @@ -117,15 +121,19 @@ export const Right: Story = () => { }; export const Left: Story = () => { - const state = { - right: { - id: 'right', - }, - left: { - id: 'left', + const state: State = { + byId: { + memory: { + right: { + id: 'right', + }, + left: { + id: 'left', + }, + preview: undefined, + }, }, - preview: [], - } as unknown as State; + }; return ( @@ -135,19 +143,23 @@ export const Left: Story = () => { }; export const Preview: Story = () => { - const state = { - right: { - id: 'right', - }, - left: { - id: 'left', - }, - preview: [ - { - id: 'preview1', + const state: State = { + byId: { + memory: { + right: { + id: 'right', + }, + left: { + id: 'left', + }, + preview: [ + { + id: 'preview1', + }, + ], }, - ], - } as unknown as State; + }, + }; return ( @@ -157,22 +169,26 @@ export const Preview: Story = () => { }; export const MultiplePreviews: Story = () => { - const state = { - right: { - id: 'right', - }, - left: { - id: 'left', - }, - preview: [ - { - id: 'preview1', + const state: State = { + byId: { + memory: { + right: { + id: 'right', + }, + left: { + id: 'left', + }, + preview: [ + { + id: 'preview1', + }, + { + id: 'preview2', + }, + ], }, - { - id: 'preview2', - }, - ], - } as unknown as State; + }, + }; return ( diff --git a/packages/kbn-expandable-flyout/src/test/provider.tsx b/packages/kbn-expandable-flyout/src/test/provider.tsx index 896b563056206..281225161b27a 100644 --- a/packages/kbn-expandable-flyout/src/test/provider.tsx +++ b/packages/kbn-expandable-flyout/src/test/provider.tsx @@ -9,6 +9,7 @@ import { Provider as ReduxProvider } from 'react-redux'; import { configureStore } from '@reduxjs/toolkit'; import React, { FC, PropsWithChildren } from 'react'; +import { I18nProvider } from '@kbn/i18n-react'; import { ExpandableFlyoutContextProvider } from '../context'; import { reducer } from '../reducer'; import { Context } from '../redux'; @@ -32,10 +33,12 @@ export const TestProvider: FC> = ({ }); return ( - - - {children} - - + + + + {children} + + + ); }; diff --git a/packages/kbn-expandable-flyout/tsconfig.json b/packages/kbn-expandable-flyout/tsconfig.json index 2b6e518016871..5a0cf87cf61e2 100644 --- a/packages/kbn-expandable-flyout/tsconfig.json +++ b/packages/kbn-expandable-flyout/tsconfig.json @@ -20,6 +20,7 @@ ], "kbn_references": [ "@kbn/i18n", - "@kbn/kibana-utils-plugin" + "@kbn/kibana-utils-plugin", + "@kbn/i18n-react" ] }