make client own package (using create-react-app)

This commit is contained in:
Thomas Ruoff
2017-02-23 00:45:39 +01:00
parent 8bf72b470e
commit 2441268fb8
44 changed files with 1816 additions and 576 deletions

30
client/src/Preview.js Normal file
View File

@@ -0,0 +1,30 @@
import React from 'react';
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>
);
}
const styles = {
width: '700px',
height: '1050px'
};
return (
<embed src={props.pdfUrl} style={styles} type="application/pdf" />
);
};