Skip to content

Commit c31c5db

Browse files
authored
Merge pull request #50 from kit-data-manager/image-improvements
Improve sizing and design of image preview
2 parents 80f8e6f + dc24a72 commit c31c5db

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

src/components/result/GenericResultViewImage.tsx

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,13 @@ export function GenericResultViewImage({
2828
<Fullscreen className="rfs-size-4" />
2929
</Button>
3030
</DialogTrigger>
31-
<DialogContent className="rfs-max-w-[90vw] rfs-max-h-[90vh] rfs-w-auto rfs-overflow-auto">
32-
<DialogTitle>{title}</DialogTitle>
33-
<GenericResultViewImageCarousel images={previewImage} title={title} fullSize />
31+
<DialogContent className="rfs-max-w-[90vw] rfs-max-h-[90vh] rfs-w-fit !rfs-p-0 rfs-overflow-auto">
32+
<div className={"rfs-p-4"}>
33+
<GenericResultViewImageCarousel images={previewImage} title={title} fullSize />
34+
</div>
35+
<div className="rfs-bg-muted rfs-p-4 rfs-rounded-b-lg">
36+
<DialogTitle>{title}</DialogTitle>
37+
</div>
3438
</DialogContent>
3539
</Dialog>
3640
</div>
@@ -43,10 +47,12 @@ export function GenericResultViewImage({
4347
alt={`Preview for ${title}`}
4448
/>
4549
</DialogTrigger>
46-
<DialogContent className="rfs-p-4 rfs-max-w-none !rfs-w-auto">
47-
<DialogTitle>{title}</DialogTitle>
48-
<div className="rfs-justify-center rfs-flex">
49-
<img className="rfs-max-w-[90vw] rfs-max-h-[90vh]" src={previewImage} alt={`Preview for ${title}`} />
50+
<DialogContent className="!rfs-p-0 !rfs-max-w-[calc(100vw-40px)] !rfs-max-h-[calc(100vh-40px)] !rfs-w-fit rfs-overflow-auto">
51+
<div className="rfs-justify-center rfs-flex rfs-p-4">
52+
<img src={previewImage} alt={`Preview for ${title}`} />
53+
</div>
54+
<div className="rfs-bg-muted rfs-p-4 rfs-rounded-b-lg">
55+
<DialogTitle>{title}</DialogTitle>
5056
</div>
5157
</DialogContent>
5258
</Dialog>

0 commit comments

Comments
 (0)