20 lines
692 B
TypeScript
20 lines
692 B
TypeScript
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
import { Image, Modal, ModalProps, ScrollArea } from '@mantine/core';
|
|
|
|
export default function ShowImageModal({ src, fallbackSrc, ...props }: ModalProps & { src: string; fallbackSrc: string }) {
|
|
return (
|
|
<Modal
|
|
classNames={{
|
|
header: '!flex !item-center !justify-center w-full',
|
|
}}
|
|
{...props}
|
|
size={'xl'}
|
|
title={<span className="text-xl font-bold">Image</span>}
|
|
centered
|
|
scrollAreaComponent={ScrollArea.Autosize}
|
|
>
|
|
<Image src={src} fallbackSrc={fallbackSrc} />
|
|
</Modal>
|
|
);
|
|
}
|