2023-01-05 12:34:34 +00:00
|
|
|
import { pageListProps, searchPageProps } from "@saleor/fixtures";
|
2022-03-09 08:56:55 +00:00
|
|
|
import { LanguageCodeEnum } from "@saleor/graphql";
|
2023-01-05 12:34:34 +00:00
|
|
|
import Decorator from "@saleor/storybook/Decorator";
|
2022-05-31 12:53:16 +00:00
|
|
|
import { PaginatorContextDecorator } from "@saleor/storybook/PaginatorContextDecorator";
|
2019-06-19 14:40:52 +00:00
|
|
|
import { storiesOf } from "@storybook/react";
|
2019-08-09 10:26:22 +00:00
|
|
|
import React from "react";
|
2019-06-19 14:40:52 +00:00
|
|
|
|
2023-01-05 12:34:34 +00:00
|
|
|
import TranslationsEntitiesList from "../TranslationsEntitiesList";
|
2019-06-19 14:40:52 +00:00
|
|
|
import TranslationsEntitiesListPage, {
|
2022-06-21 09:36:55 +00:00
|
|
|
TranslationsEntitiesListPageProps,
|
2023-01-05 12:34:34 +00:00
|
|
|
} from "./TranslationsEntitiesListPage";
|
2019-06-19 14:40:52 +00:00
|
|
|
|
|
|
|
const props: TranslationsEntitiesListPageProps = {
|
|
|
|
...pageListProps.default,
|
2019-09-12 13:31:08 +00:00
|
|
|
...searchPageProps,
|
2019-06-19 14:40:52 +00:00
|
|
|
children: null,
|
|
|
|
filters: {
|
|
|
|
current: "products",
|
|
|
|
onCategoriesTabClick: () => undefined,
|
|
|
|
onCollectionsTabClick: () => undefined,
|
|
|
|
onPagesTabClick: () => undefined,
|
2021-08-09 14:59:12 +00:00
|
|
|
onAttributesTabClick: () => undefined,
|
2019-06-19 14:40:52 +00:00
|
|
|
onProductsTabClick: () => undefined,
|
|
|
|
onSalesTabClick: () => undefined,
|
2020-11-27 15:53:48 +00:00
|
|
|
onShippingMethodsTabClick: () => undefined,
|
2022-06-21 09:36:55 +00:00
|
|
|
onVouchersTabClick: () => undefined,
|
2022-07-26 09:12:02 +00:00
|
|
|
onMenuItemsTabClick: () => undefined,
|
2019-06-19 14:40:52 +00:00
|
|
|
},
|
|
|
|
language: {
|
|
|
|
__typename: "LanguageDisplay",
|
|
|
|
code: LanguageCodeEnum.EN,
|
2022-06-21 09:36:55 +00:00
|
|
|
language: "English",
|
|
|
|
},
|
2019-06-19 14:40:52 +00:00
|
|
|
};
|
|
|
|
|
2023-01-05 12:34:34 +00:00
|
|
|
storiesOf("Translations / Entity list", module)
|
2019-06-19 14:40:52 +00:00
|
|
|
.addDecorator(Decorator)
|
2022-05-31 12:53:16 +00:00
|
|
|
.addDecorator(PaginatorContextDecorator)
|
2019-06-19 14:40:52 +00:00
|
|
|
.add("default", () => (
|
|
|
|
<TranslationsEntitiesListPage {...props}>
|
|
|
|
<TranslationsEntitiesList
|
|
|
|
disabled={false}
|
|
|
|
entities={[
|
|
|
|
{
|
|
|
|
completion: { current: 1, max: 3 },
|
|
|
|
id: "1",
|
2022-06-21 09:36:55 +00:00
|
|
|
name: "White Hoodie",
|
2019-06-19 14:40:52 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
completion: { current: 2, max: 3 },
|
|
|
|
id: "1",
|
2022-06-21 09:36:55 +00:00
|
|
|
name: "Brown Supreme Hoodie",
|
|
|
|
},
|
2019-06-19 14:40:52 +00:00
|
|
|
]}
|
2022-05-06 08:59:55 +00:00
|
|
|
getRowHref={() => ""}
|
2019-06-19 14:40:52 +00:00
|
|
|
/>
|
|
|
|
</TranslationsEntitiesListPage>
|
|
|
|
));
|