lbry-desktop/ui/component/viewers/htmlViewer.jsx
2019-11-11 13:27:29 -05:00

20 lines
454 B
JavaScript

// @flow
import React from 'react';
import { stopContextMenu } from 'util/context-menu';
type Props = {
source: string,
};
class HtmlViewer extends React.PureComponent<Props> {
render() {
const { source } = this.props;
return (
<div className="file-render__viewer" onContextMenu={stopContextMenu}>
<iframe sandbox="" title={__('File preview')} src={`file://${source}`} />
</div>
);
}
}
export default HtmlViewer;