mirror of
https://github.com/inventree/InvenTree.git
synced 2026-11-14 12:32:44 +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) => {
|
||||
cancelEvent(event);
|
||||
modals.open({
|
||||
children: <ApiImage src={img} thumbnail={props.thumbnail} />,
|
||||
children: <ApiImage src={img} thumbnail={props.thumbnail} mah='85vh' />,
|
||||
size: '90vw',
|
||||
withCloseButton: false
|
||||
});
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user