diff --git a/.storybook/decorators.js b/.storybook/decorators.js
index ff04f30..961e4b6 100644
--- a/.storybook/decorators.js
+++ b/.storybook/decorators.js
@@ -6,8 +6,6 @@ import { Provider as ReduxProvider } from 'react-redux'
import configureStore from '../codebases/compdem/client-admin/src/store'
import { MemoryRouter } from 'react-router'
-const store = configureStore()
-
export const withThemeUi = (Story) => (
@@ -20,11 +18,32 @@ export const withDelibThemeUi = (Story) => (
)
-export const withRedux = (Story) => (
-
-
-
-)
+/**
+ *
+ * Provide components support for redux-store
+ * optionally passing custom initial state, and using default initial state if not passed
+ *
+ * @example
+ * export const MyComponent = () => Template.bind({})
+ * MyComponent.parameters = {
+ * store: {
+ * initialState: {
+ * foo: 'bar'
+ * },
+ * }
+ * };
+ *
+ * Source: https://github.com/yannbf/mealdrop/blob/main/.storybook/decorators.tsx#L118
+ */
+export const withRedux = (Story, { parameters }) => {
+ // Creates a store by merging optional custom initialState
+ const store = configureStore(parameters.store?.initialState)
+ return (
+
+
+
+ )
+}
export const svgDecorator = (Story) => (