diff --git a/src/storybook/__snapshots__/Stories.test.ts.snap b/src/storybook/__snapshots__/Stories.test.ts.snap
index 5ced1da26..0ba09cbb4 100644
--- a/src/storybook/__snapshots__/Stories.test.ts.snap
+++ b/src/storybook/__snapshots__/Stories.test.ts.snap
@@ -10012,7 +10012,7 @@ exports[`Storyshots Views / Attributes / Attribute details form errors 1`] = `
- Generic form error
+ This field is required
- Generic form error
+ This field is required
- Generic form error
+ API error
`;
+exports[`Storyshots Views / Categories / Create category form errors 1`] = `
+
+`;
+
exports[`Storyshots Views / Categories / Update category default 1`] = `
`;
+exports[`Storyshots Views / Categories / Update category form errors 1`] = `
+
+`;
+
exports[`Storyshots Views / Categories / Update category loading 1`] = `
- Generic form error
+ This field is required
- Generic form error
+ This field is required
@@ -26436,9 +27911,7 @@ Ctrl + K"
/>
- Generic form error
-
+ />
@@ -30709,6 +32182,764 @@ Ctrl + K"
`;
+exports[`Storyshots Views / Collections / Create collection form errors 1`] = `
+
+
+
+`;
+
exports[`Storyshots Views / Collections / Create collection loading 1`] = `
)
.add("When loading", () => (
+ ))
+ .add("form errors", () => (
+ ({
+ __typename: "ProductError",
+ ...err
+ }))}
+ />
));
diff --git a/src/storybook/stories/categories/CategoryUpdatePage.tsx b/src/storybook/stories/categories/CategoryUpdatePage.tsx
index 6bcd78919..f83b85ce2 100644
--- a/src/storybook/stories/categories/CategoryUpdatePage.tsx
+++ b/src/storybook/stories/categories/CategoryUpdatePage.tsx
@@ -3,6 +3,7 @@ import { Omit } from "@material-ui/core";
import { storiesOf } from "@storybook/react";
import React from "react";
+import { ProductErrorCode } from "@saleor/types/globalTypes";
import { category as categoryFixture } from "../../../categories/fixtures";
import CategoryUpdatePage, {
@@ -79,4 +80,22 @@ storiesOf("Views / Categories / Update category", module)
products={undefined}
category={undefined}
/>
+ ))
+ .add("form errors", () => (
+ ({
+ __typename: "ProductError",
+ ...err
+ }))}
+ />
));
diff --git a/src/storybook/stories/collections/CollectionCreatePage.tsx b/src/storybook/stories/collections/CollectionCreatePage.tsx
index 672dfe27f..9f174ad6e 100644
--- a/src/storybook/stories/collections/CollectionCreatePage.tsx
+++ b/src/storybook/stories/collections/CollectionCreatePage.tsx
@@ -2,6 +2,7 @@ import { Omit } from "@material-ui/core";
import { storiesOf } from "@storybook/react";
import React from "react";
+import { ProductErrorCode } from "@saleor/types/globalTypes";
import CollectionCreatePage, {
CollectionCreatePageProps
} from "../../../collections/components/CollectionCreatePage";
@@ -18,4 +19,30 @@ const props: Omit = {
storiesOf("Views / Collections / Create collection", module)
.addDecorator(Decorator)
.add("default", () => )
- .add("loading", () => );
+ .add("loading", () => )
+ .add("form errors", () => (
+ ({
+ __typename: "ProductError",
+ ...err
+ }))}
+ />
+ ));
diff --git a/src/storybook/stories/collections/CollectionDetailsPage.tsx b/src/storybook/stories/collections/CollectionDetailsPage.tsx
index ddf9dee05..91d976019 100644
--- a/src/storybook/stories/collections/CollectionDetailsPage.tsx
+++ b/src/storybook/stories/collections/CollectionDetailsPage.tsx
@@ -4,7 +4,7 @@ import React from "react";
import placeholderCollectionImage from "@assets/images/block1.jpg";
import placeholderProductImage from "@assets/images/placeholder60x60.png";
-import { formError } from "@saleor/storybook/misc";
+import { ProductErrorCode } from "@saleor/types/globalTypes";
import CollectionDetailsPage, {
CollectionDetailsPageProps
} from "../../../collections/components/CollectionDetailsPage";
@@ -42,9 +42,27 @@ storiesOf("Views / Collections / Collection details", module)
.add("form errors", () => (
({
+ __typename: "ProductError",
+ ...err
+ }))}
/>
))
.add("no products", () => (