mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +00:00
re-structure to monorepo.
This commit is contained in:
25
packages/webapp/src/components/PdfPreview/index.tsx
Normal file
25
packages/webapp/src/components/PdfPreview/index.tsx
Normal file
@@ -0,0 +1,25 @@
|
||||
// @ts-nocheck
|
||||
import React from 'react';
|
||||
import { Spinner, Classes } from '@blueprintjs/core';
|
||||
import classNames from 'classnames';
|
||||
|
||||
/**
|
||||
* Previews the pdf document of the given object url.
|
||||
*/
|
||||
export function PdfDocumentPreview({ url, height, width, isLoading }) {
|
||||
const content = isLoading ? (
|
||||
<Spinner size={30} />
|
||||
) : (
|
||||
<embed src={url} height={height} width={width} />
|
||||
);
|
||||
|
||||
return (
|
||||
<div
|
||||
className={classNames(Classes.DIALOG_BODY, {
|
||||
loading: isLoading,
|
||||
})}
|
||||
>
|
||||
{content}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user