From 20762126c94da65196ce7e10d7560a4dcbd775df Mon Sep 17 00:00:00 2001 From: ShriD2003 Date: Wed, 21 Aug 2024 15:08:35 +0530 Subject: [PATCH] chore: delete config.js --- .storybook/config.js | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 .storybook/config.js diff --git a/.storybook/config.js b/.storybook/config.js deleted file mode 100644 index 5096b9c..0000000 --- a/.storybook/config.js +++ /dev/null @@ -1,36 +0,0 @@ -import React from 'react'; -import { configure } from '@storybook/react'; -import { addDecorator } from '@storybook/react'; -import { withKnobs } from '@storybook/addon-knobs'; -import StoryRouter from 'storybook-router'; -import { withSmartKnobs } from 'storybook-addon-smart-knobs'; -import { setIntlConfig, withIntl } from 'storybook-addon-intl'; -import { translationMessages, appLocales, DEFAULT_LOCALE } from '../app/i18n.ts'; - -Object.values = (obj) => Object.keys(obj).map((key) => obj[key]); - -addDecorator(withKnobs); -addDecorator(withSmartKnobs); -addDecorator(StoryRouter()); - -const getMessages = (locale) => translationMessages[locale]; -setIntlConfig({ - locales: appLocales, - defaultLocale: DEFAULT_LOCALE, - getMessages -}); - -addDecorator(withIntl); - -// automatically import all files ending in *.stories.js -function requireAll(requireContext) { - return requireContext.keys().map((key) => { - return requireContext; - }); -} - -function loadStories() { - const req = require.context('../app/components/', true, /^.*\.stories$/); - return requireAll(req); -} -configure(loadStories(), module);