26 lines
638 B
JavaScript
26 lines
638 B
JavaScript
import React from "react";
|
|
import CommonModal from '../CommonModal';
|
|
|
|
const PdfView = ({ visible, title, onClose, url, fileId }) => {
|
|
return (
|
|
<CommonModal
|
|
visible={visible}
|
|
title={title}
|
|
onClose={onClose}
|
|
width="60%"
|
|
bodyStyle={{ padding: 0, overflow: 'hidden' }}
|
|
>
|
|
<iframe
|
|
style={{
|
|
height: '100%',
|
|
width: '100%',
|
|
border: 0,
|
|
background: '#fff'
|
|
}}
|
|
src={`${process.env.PUBLIC_URL}/static/pdf/web/viewer.html?file=${encodeURIComponent(url + fileId)}`}
|
|
title={title}
|
|
/>
|
|
</CommonModal>
|
|
)
|
|
}
|
|
export default PdfView |