sticky download button so long previews doesn't push buttons down, closes #205

This commit is contained in:
spencerwooo
2021-12-29 15:52:18 +08:00
parent 29df9bc9cb
commit 172d0a97eb
8 changed files with 26 additions and 23 deletions
+8 -4
View File
@@ -12,14 +12,18 @@ const OfficePreview: FunctionComponent<{ file: any }> = ({ file }) => {
}, [])
return (
<>
<div>
<div className="overflow-scroll" ref={docContainer} style={{ maxHeight: '90vh' }}>
<Preview url={encodeURIComponent(file['@microsoft.graph.downloadUrl'])} width={docContainerWidth.toString()} height="800" />
<Preview
url={encodeURIComponent(file['@microsoft.graph.downloadUrl'])}
width={docContainerWidth.toString()}
height="600"
/>
</div>
<div className="mt-4">
<div className="border-t-gray-200 dark:border-t-gray-700 border-t p-2 sticky bottom-0 left-0 right-0 z-10 bg-white bg-opacity-80 backdrop-blur-md dark:bg-gray-900">
<DownloadButtonGroup downloadUrl={file['@microsoft.graph.downloadUrl']} />
</div>
</>
</div>
)
}