Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Revert changes made to decorator

dominik-zeglenf42b6590f984
diff --git a/saleor/static/dashboard-next/storybook/Decorator.tsx b/saleor/static/dashboard-next/storybook/Decorator.tsx
index 794b66df94..beb127ca68 100644
--- a/saleor/static/dashboard-next/storybook/Decorator.tsx
+++ b/saleor/static/dashboard-next/storybook/Decorator.tsx
@@ -1,46 +1,28 @@
import * as React from "react";
-import AppActionContext from "../components/AppLayout/AppActionContext";
import { Provider as DateProvider } from "../components/Date/DateContext";
import { FormProvider } from "../components/Form";
import { MessageManager } from "../components/messages";
import ThemeProvider from "../components/Theme";
import { TimezoneProvider } from "../components/Timezone";
-const DecoratorComponent: React.FC<{ story: any }> = ({ story }) => {
- const appActionAnchor = React.useRef<HTMLDivElement>();
-
- return (
- <FormProvider>
- <DateProvider value={+new Date("2018-08-07T14:30:44+00:00")}>
- <TimezoneProvider value="America/New_York">
- <ThemeProvider isDefaultDark={false}>
- <MessageManager>
- <AppActionContext.Provider value={appActionAnchor}>
- <div
- style={{
- display: "flex",
- flexGrow: 1,
- padding: 24
- }}
- >
- <div style={{ flexGrow: 1 }}>{story}</div>
- </div>
- <div
- style={{
- bottom: 0,
- gridColumn: 2,
- position: "sticky"
- }}
- ref={appActionAnchor}
- />
- </AppActionContext.Provider>
- </MessageManager>
- </ThemeProvider>
- </TimezoneProvider>
- </DateProvider>
- </FormProvider>
- );
-};
-export const Decorator = storyFn => <DecoratorComponent story={storyFn()} />;
+export const Decorator = storyFn => (
+ <FormProvider>
+ <DateProvider value={+new Date("2018-08-07T14:30:44+00:00")}>
+ <TimezoneProvider value="America/New_York">
+ <ThemeProvider isDefaultDark={false}>
+ <MessageManager>
+ <div
+ style={{
+ padding: 24
+ }}
+ >
+ {storyFn()}
+ </div>
+ </MessageManager>
+ </ThemeProvider>
+ </TimezoneProvider>
+ </DateProvider>
+ </FormProvider>
+);
export default Decorator;