mirror of
https://github.com/tomru/pdfer.git
synced 2026-03-03 06:27:19 +01:00
restyle all the things
This commit is contained in:
@@ -6,16 +6,9 @@ export default function Preview({ pdfIsLoading, pdfError, pdfUrl }: IPdfProps) {
|
||||
return <div>Lade…</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" />
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user