import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import { ContentState, convertToRaw, RawDraftContentState } from "draft-js"; import React from "react"; import AppHeader from "@saleor/components/AppHeader"; import { CardSpacer } from "@saleor/components/CardSpacer"; import CardTitle from "@saleor/components/CardTitle"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import { Container } from "@saleor/components/Container"; import Form from "@saleor/components/Form"; import Grid from "@saleor/components/Grid"; import PageHeader from "@saleor/components/PageHeader"; import SaveButtonBar from "@saleor/components/SaveButtonBar"; import SeoForm from "@saleor/components/SeoForm"; import VisibilityCard from "@saleor/components/VisibilityCard"; import i18n from "../../../i18n"; import { UserError } from "../../../types"; import CollectionDetails from "../CollectionDetails/CollectionDetails"; import { CollectionImage } from "../CollectionImage/CollectionImage"; export interface CollectionCreatePageFormData { backgroundImage: { url: string; value: string; }; backgroundImageAlt: string; description: RawDraftContentState; name: string; publicationDate: string; isPublished: boolean; seoDescription: string; seoTitle: string; } export interface CollectionCreatePageProps { disabled: boolean; errors: UserError[]; saveButtonBarState: ConfirmButtonTransitionState; onBack: () => void; onSubmit: (data: CollectionCreatePageFormData) => void; } const initialForm: CollectionCreatePageFormData = { backgroundImage: { url: null, value: null }, backgroundImageAlt: "", description: convertToRaw(ContentState.createFromText("")), isPublished: false, name: "", publicationDate: "", seoDescription: "", seoTitle: "" }; const CollectionCreatePage: React.StatelessComponent< CollectionCreatePageProps > = ({ disabled, errors, saveButtonBarState, onBack, onSubmit }: CollectionCreatePageProps) => (
); CollectionCreatePage.displayName = "CollectionCreatePage"; export default CollectionCreatePage;