mirror of
https://github.com/tomru/pdfer.git
synced 2026-03-03 06:27:19 +01:00
26 lines
480 B
JavaScript
26 lines
480 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 (
|
|
<embed src={props.pdfUrl} width="600px" height="1000px"/>
|
|
);
|
|
};
|