From 1d397ba6b49d4232fb8b55e411f1e5d8e90af115 Mon Sep 17 00:00:00 2001 From: Corey Robertson Date: Wed, 11 Dec 2019 13:13:08 -0500 Subject: [PATCH] Use our own new platform mock for storybook --- x-pack/legacy/plugins/canvas/.storybook/config.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/x-pack/legacy/plugins/canvas/.storybook/config.js b/x-pack/legacy/plugins/canvas/.storybook/config.js index d3cd8e8057ae8..196ae3f45ed93 100644 --- a/x-pack/legacy/plugins/canvas/.storybook/config.js +++ b/x-pack/legacy/plugins/canvas/.storybook/config.js @@ -10,7 +10,6 @@ import { withKnobs } from '@storybook/addon-knobs/react'; import { withInfo } from '@storybook/addon-info'; import { create } from '@storybook/theming'; -import { coreMock } from 'src/core/public/mocks'; import { KibanaContextProvider } from '../../../../../src/plugins/kibana_react/public'; // If we're running Storyshots, be sure to register the require context hook. @@ -38,9 +37,12 @@ if (process.env.NODE_ENV === 'test') { } // Add New Platform Context for any stories that need it -addDecorator(fn => ( - {fn()} -)); +const settings = new Map(); +settings.set('darkMode', true); +const platform = { + uiSettings: settings, +}; +addDecorator(fn => {fn()}); function loadStories() { require('./dll_contexts');