add support for pdf previews with pdf.js

This commit is contained in:
spencerwooo
2021-06-25 00:42:46 +01:00
parent b1cced5e7e
commit a2f853259f
10 changed files with 1323 additions and 65 deletions
+4 -4
View File
@@ -5,13 +5,13 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
export const AudioPreview: FunctionComponent<{ file: any }> = ({ file }) => {
return (
<div className="bg-white rounded shadow p-3 w-full">
<div className="flex space-x-4">
<div className="flex items-center justify-center p-10 bg-gray-100 rounded">
<FontAwesomeIcon className="" icon="music" size="lg" />
<div className="flex flex-col space-y-4 md:flex-row md:space-x-4">
<div className="flex items-center justify-center bg-gray-100 rounded p-28 md:p-14">
<FontAwesomeIcon icon="music" size="lg" />
</div>
<div className="flex flex-col w-full space-y-2">
<div>{file.name}</div>
<div className="text-gray-500 text-sm">
<div className="text-gray-500 text-sm pb-4">
Last modified:{' '}
{new Date(file.lastModifiedDateTime).toLocaleString(undefined, {
dateStyle: 'short',