Created
October 4, 2019 19:22
-
-
Save andyhite/4167b227ff2f8630d73e25712fe568fd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | |
) | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment