Skip to content

Commit

Permalink
Fix modal bug; fix incorrect type
Browse files Browse the repository at this point in the history
  • Loading branch information
clintandrewhall committed Jan 27, 2021
1 parent 7861086 commit 862df19
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/plugins/presentation_util/storybook/decorator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@

import React from 'react';

import { DecoratorFunction } from '@storybook/addons';
import { DecoratorFn } from '@storybook/react';
import { I18nProvider } from '@kbn/i18n/react';
import { pluginServices } from '../public/services';
import { PresentationUtilServices } from '../public/services';
import { providers, StorybookParams } from '../public/services/storybook';
import { PluginServiceRegistry } from '../public/services/create';

export const servicesContextDecorator: DecoratorFunction = (story: Function, storybook) => {
export const servicesContextDecorator: DecoratorFn = (story: Function, storybook) => {
const registry = new PluginServiceRegistry<PresentationUtilServices, StorybookParams>(providers);
pluginServices.setRegistry(registry.start(storybook.args));
const ContextProvider = pluginServices.getContextProvider();
Expand Down
6 changes: 2 additions & 4 deletions x-pack/plugins/maps/public/routes/map_page/top_nav_config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,10 @@ export function getTopNavConfig({
options={tagSelector}
/>
) : (
<PresentationUtilContext>
<SavedObjectSaveModalDashboard {...saveModalProps} tagOptions={tagSelector} />
</PresentationUtilContext>
<SavedObjectSaveModalDashboard {...saveModalProps} tagOptions={tagSelector} />
);

showSaveModal(saveModal, getCoreI18n().Context);
showSaveModal(saveModal, getCoreI18n().Context, PresentationUtilContext);
},
});

Expand Down

0 comments on commit 862df19

Please sign in to comment.