1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-30 10:39:46 +02:00

fix: Improve PDF viewer cross-browser compatibility

Closes #1219
This commit is contained in:
Maksim Eltyshev 2025-07-02 18:26:03 +02:00
parent e58a9f5d21
commit f0680831c2
3 changed files with 48 additions and 13 deletions

View file

@ -0,0 +1,26 @@
/*!
* Copyright (c) 2024 PLANKA Software GmbH
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
*/
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import styles from './PdfViewer.module.scss';
const PdfViewer = React.memo(({ src, className }) => (
// eslint-disable-next-line jsx-a11y/iframe-has-title
<iframe src={src} type="application/pdf" className={classNames(styles.wrapper, className)} />
));
PdfViewer.propTypes = {
src: PropTypes.string.isRequired,
className: PropTypes.string,
};
PdfViewer.defaultProps = {
className: undefined,
};
export default PdfViewer;