saleor-dashboard/src/components/AvailabilityCard/AvailabilityCard.stories.tsx
AlicjaSzu eba4ba2edf
update VisibilityCard component (#679)
* update VisibilityCard component

* add visibleInListings in Product

* update mutations and types with visibleInListings

* update ProductExportDialogInfo with availableForPurchase

* update defaultMessages

* update useDateLocalize hook

* update cypress tests

* update orders with availability info

* revert cypress changes

* update changelog

* update product update handlers

* fix VisibilityCard styles

* create AvailabilityCard component

* update defaultMessages

* update snapshots and messages

* fix ProductCreatePage form data types

* update defaultMessages
2020-09-03 12:25:16 +02:00

25 lines
652 B
TypeScript

import Decorator from "@saleor/storybook/Decorator";
import { storiesOf } from "@storybook/react";
import React from "react";
import AvailabilityCard from "./AvailabilityCard";
const props = {
data: {
availableForPurchase: "",
isAvailableForPurchase: false,
isPublished: true,
publicationDate: "",
visibleInListings: true
},
errors: [],
messages: {
hiddenLabel: "Not published",
hiddenSecondLabel: "hidden label",
visibleLabel: "Published"
},
onChange: () => undefined
};
storiesOf("Generics / AvailabilityCard", module)
.addDecorator(Decorator)
.add("default", () => <AvailabilityCard {...props} />);