restyle all the things

This commit is contained in:
Thomas Ruoff
2021-02-25 00:13:37 +01:00
parent fb91b1cbc8
commit d4c71c40ca
9 changed files with 94 additions and 81 deletions

View File

@@ -6,16 +6,9 @@ export default function Preview({ pdfIsLoading, pdfError, pdfUrl }: IPdfProps) {
return <div>Lade&hellip;</div>
}
const errorStyles = {
padding: '6px 12px',
color: 'white',
backgroundColor: '#d81e1e',
borderRadius: '3px',
}
if (pdfError) {
return (
<div style={errorStyles}>
<div className="flex items-center bg-red-100 border-solid border border-red-700 rounded text-red-700 py-2 px-3">
<span role="img" aria-label="Crying Man">
😢
</span>{' '}
@@ -25,13 +18,8 @@ export default function Preview({ pdfIsLoading, pdfError, pdfUrl }: IPdfProps) {
}
if (!pdfUrl) {
return <div>Knopf drücken dann gibts hier was zu sehen!</div>
return null
}
const styles = {
width: '700px',
height: '1050px',
}
return <embed src={pdfUrl} style={styles} type="application/pdf" />
return <embed src={pdfUrl} className="h-screen w-auto" type="application/pdf" />
}