872259b73a
* am I done? * post diff * unused selector cleanup * missed commit * mess with button styles * fix flow Co-authored-by: Jeremy Kauffman <jeremy@lbry.io> Co-authored-by: Sean Yesmunt <sean@lbry.io>
24 lines
660 B
JavaScript
24 lines
660 B
JavaScript
// @flow
|
|
import * as React from 'react';
|
|
import { stopContextMenu } from 'util/context-menu';
|
|
import IframeReact from 'component/IframeReact';
|
|
|
|
type Props = {
|
|
source: string,
|
|
};
|
|
|
|
class PdfViewer extends React.PureComponent<Props> {
|
|
render() {
|
|
const { source } = this.props;
|
|
const src = IS_WEB ? source : `file://${source}`;
|
|
return (
|
|
<div className="file-render__viewer file-render__viewer--document" onContextMenu={stopContextMenu}>
|
|
<div className="file-render__viewer file-render__viewer--iframe">
|
|
<IframeReact title={__('File preview')} src={src} />
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
}
|
|
|
|
export default PdfViewer;
|