mirror of
https://github.com/tomru/pdfer.git
synced 2026-03-03 14:37:21 +01:00
26 lines
511 B
JavaScript
26 lines
511 B
JavaScript
import { Component, h } from 'preact';
|
|
|
|
export default props => {
|
|
if (props.pdfIsLoading) {
|
|
return (
|
|
<div>Lade...</div>
|
|
);
|
|
}
|
|
|
|
if (props.pdfError) {
|
|
return (
|
|
<div>{props.pdfError}</div>
|
|
);
|
|
}
|
|
|
|
if (!props.pdfUrl) {
|
|
return (
|
|
<div>Knopf drücken dann gibts hier was zu sehen!</div>
|
|
);
|
|
}
|
|
|
|
return (
|
|
<iframe src={props.pdfUrl} style="width:700px; height:1050px;" frameborder="0"></iframe>
|
|
);
|
|
};
|