Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const DOCUMENT_FORMS = {
- "pay_application": PayApplicationForm,
- "invoice": InvoiceForm,
- ...
- }
- const DocumentViewer = (props) => {
- const { document } = props;
- const DocumentForm = DOCUMENT_FORMS[document.type];
- const fileViewHeader = (
- <Pane padding={16} display="flex" justifyContent="space-between">
- <Pane>
- <Text size={600}>Boulding Creek Draw 7 Uploads</Text>
- </Pane>
- <Pane>
- <Button>Next</Button>
- ...
- </Pane>
- </Pane>
- );
- const fileViewSidebar = (
- ...
- );
- return (
- <FileViewer
- header={fileViewHeader}
- sidebar={fileViewSidebar}
- previewFileUrl={document.file.url}
- previewFileType={document.file.type}
- >
- <DocumentForm {...props} />
- </FileViewer>
- )
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement