Fix: floating widget match style with original one (#10317)

### What problem does this PR solve?

These changes are intended to implement the remaining functionalities of
the fullscreen widget.

The question arises: how to display document prieview of PDFs in this
floating widget?
- simply enlarge the widget window
- implement zoom in/out
- render outside the iframe?

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Adrian Gora
2025-09-28 07:58:10 +02:00
committed by GitHub
parent 59cb0eb8bc
commit bece37e6c8
4 changed files with 429 additions and 130 deletions

View File

@ -7,6 +7,8 @@ import DocumentPreviewer from '../pdf-previewer';
interface IProps extends IModalProps<any> {
documentId: string;
chunk: IChunk | IReferenceChunk;
width?: string | number;
height?: string | number;
}
export const PdfDrawer = ({
@ -14,13 +16,16 @@ export const PdfDrawer = ({
hideModal,
documentId,
chunk,
width = '50vw',
height,
}: IProps) => {
return (
<Drawer
title="Document Previewer"
onClose={hideModal}
open={visible}
width={'50vw'}
width={width}
height={height}
>
<DocumentPreviewer
documentId={documentId}
@ -31,4 +36,4 @@ export const PdfDrawer = ({
);
};
export default PdfDrawer;
export default PdfDrawer;