Skip to content

Commit

Permalink
Fix TS issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sebelga committed Sep 8, 2022
1 parent 2e54695 commit 36365fa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@
*/
import React from 'react';
import type { ComponentType } from 'react';
import { from } from 'rxjs';

import { TableListViewProvider, Services } from '../services';

export const getMockServices = (overrides?: Partial<Services>) => {
const services: Services = {
canEditAdvancedSettings: true,
getListingLimitSettingsUrl: () => 'http://elastic.co',
notifyError: () => undefined,
currentAppId$: from('mockedApp'),
navigateToUrl: () => undefined,
...overrides,
};

Expand Down
4 changes: 4 additions & 0 deletions packages/content-management/table_list/src/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import { from } from 'rxjs';

import { Services } from './services';

/**
Expand All @@ -23,6 +25,8 @@ export const getStoryServices = (params: Params, action: ActionFn = () => {}) =>
notifyError: (title, text) => {
action('notifyError')({ title, text });
},
currentAppId$: from('mockedApp'),
navigateToUrl: () => undefined,
...params,
};

Expand Down

0 comments on commit 36365fa

Please sign in to comment.