mirror of
https://github.com/inventree/InvenTree.git
synced 2026-11-22 15:56:14 +00:00
[UI] Size the detail image modal to the viewport (#13264)
Clicking a detail image opened it at Mantine's default modal width (about 440 px), so a large image was shown no bigger than the preview. Open the modal at 90vw and cap the image at 85vh so it fits the window. Fixes #13252 Co-authored-by: jbc-af <jbc@autofruit.com> Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
1 file changed
+2
-1
@@ -430,7 +430,8 @@ export function DetailsImage(props: Readonly<DetailImageProps>) {
|
|||||||
const expandImage = (event: any) => {
|
const expandImage = (event: any) => {
|
||||||
cancelEvent(event);
|
cancelEvent(event);
|
||||||
modals.open({
|
modals.open({
|
||||||
children: <ApiImage src={img} thumbnail={props.thumbnail} />,
|
children: <ApiImage src={img} thumbnail={props.thumbnail} mah='85vh' />,
|
||||||
|
size: '90vw',
|
||||||
withCloseButton: false
|
withCloseButton: false
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in new issue
Block a user