Skip to content

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

wip

dominik-zeglen7b50d0cfbbe3
diff --git a/saleor/static/dashboard-next/storybook/config.js b/saleor/static/dashboard-next/storybook/config.js
index 8e685cac59..4ff7b9c29c 100644
--- a/saleor/static/dashboard-next/storybook/config.js
+++ b/saleor/static/dashboard-next/storybook/config.js
@@ -108,6 +108,9 @@ function loadStories() {
// Site settings
require("./stories/siteSettings/SiteSettingsKeyDialog");
require("./stories/siteSettings/SiteSettingsPage");
+
+ // Taxes
+ require("./stories/taxes/TaxListPage");
}
configure(loadStories, module);
diff --git a/saleor/static/dashboard-next/storybook/stories/taxes/TaxListPage.tsx b/saleor/static/dashboard-next/storybook/stories/taxes/TaxListPage.tsx
new file mode 100644
index 0000000000..641d363b92
--- /dev/null
+++ b/saleor/static/dashboard-next/storybook/stories/taxes/TaxListPage.tsx
@@ -0,0 +1,14 @@
+import { storiesOf } from "@storybook/react";
+import * as React from "react";
+
+import TaxListPage, {
+ TaxListPageProps
+} from "../../../taxes/components/TaxListPage";
+import Decorator from "../../Decorator";
+
+const props: TaxListPageProps = {};
+
+storiesOf("Taxes / TaxListPage", module)
+ .addDecorator(Decorator)
+ .add("default", () => <TaxListPage {...props} />)
+ .add("loading", () => <TaxListPage {...props} taxes={undefined} />);
diff --git a/saleor/static/dashboard-next/taxes/components/TaxList/TaxList.tsx b/saleor/static/dashboard-next/taxes/components/TaxList/TaxList.tsx
new file mode 100644
index 0000000000..811aab918c
--- /dev/null
+++ b/saleor/static/dashboard-next/taxes/components/TaxList/TaxList.tsx
@@ -0,0 +1,9 @@
+import { withStyles } from "@material-ui/core/styles";
+import * as React from "react";
+
+export interface TaxListProps {}
+
+const decorate = withStyles(theme => ({ root: {} }));
+const TaxList = decorate<TaxListProps>(({ classes }) => <div />);
+TaxList.displayName = "TaxList";
+export default TaxList;
diff --git a/saleor/static/dashboard-next/taxes/components/TaxList/index.ts b/saleor/static/dashboard-next/taxes/components/TaxList/index.ts
new file mode 100644
index 0000000000..8ffe988457
--- /dev/null
+++ b/saleor/static/dashboard-next/taxes/components/TaxList/index.ts
@@ -0,0 +1,2 @@
+export { default } from "./TaxList";
+export * from "./TaxList";
diff --git a/saleor/static/dashboard-next/taxes/components/TaxListPage/TaxListPage.tsx b/saleor/static/dashboard-next/taxes/components/TaxListPage/TaxListPage.tsx
new file mode 100644
index 0000000000..12b61fc4c6
--- /dev/null
+++ b/saleor/static/dashboard-next/taxes/components/TaxListPage/TaxListPage.tsx
@@ -0,0 +1,33 @@
+import * as React from "react";
+
+import { ListProps } from "../../../types";
+import Container from "../../../components/Container";
+import PageHeader from "../../../components/PageHeader";
+import i18n from "../../../i18n";
+
+export interface TaxListPageProps extends ListProps {
+ taxes: any[];
+}
+
+const TaxListPage: React.StatelessComponent<TaxListPageProps> = ({
+ disabled,
+ pageInfo,
+ taxes,
+ onNextPage,
+ onPreviousPage,
+ onRowClick
+}) => (
+ <Container width="md">
+ <PageHeader title={i18n.t("Staff members", { context: "page title" })} />
+ <TaxList
+ disabled={disabled}
+ pageInfo={pageInfo}
+ taxes={taxes}
+ onNextPage={onNextPage}
+ onPreviousPage={onPreviousPage}
+ onRowClick={onRowClick}
+ />
+ </Container>
+);
+TaxListPage.displayName = "TaxListPage";
+export default TaxListPage;
diff --git a/saleor/static/dashboard-next/taxes/components/TaxListPage/index.ts b/saleor/static/dashboard-next/taxes/components/TaxListPage/index.ts
new file mode 100644
index 0000000000..4c3e69ec45
--- /dev/null
+++ b/saleor/static/dashboard-next/taxes/components/TaxListPage/index.ts
@@ -0,0 +1,2 @@
+export { default } from "./TaxListPage";
+export * from "./TaxListPage";