feat: add page numbers to documents (#946)

This commit is contained in:
Ephraim Duncan
2024-02-22 05:36:34 +00:00
committed by GitHub
parent df132a51ab
commit a48bda0d27

View File

@ -233,10 +233,8 @@ export const PDFViewer = ({
{Array(numPages) {Array(numPages)
.fill(null) .fill(null)
.map((_, i) => ( .map((_, i) => (
<div <div key={i} className="last:-mb-2">
key={i} <div className="border-border overflow-hidden rounded border will-change-transform">
className="border-border my-8 overflow-hidden rounded border will-change-transform first:mt-0 last:mb-0"
>
<PDFPage <PDFPage
pageNumber={i + 1} pageNumber={i + 1}
width={width} width={width}
@ -246,6 +244,10 @@ export const PDFViewer = ({
onClick={(e) => onDocumentPageClick(e, i + 1)} onClick={(e) => onDocumentPageClick(e, i + 1)}
/> />
</div> </div>
<p className="text-muted-foreground/80 my-2 text-center text-[11px]">
Page {i + 1} of {numPages}
</p>
</div>
))} ))}
</PDFDocument> </PDFDocument>