feat: Contentstack <-> ImageVault integration
This commit is contained in:
41
remix/app/components/FullSizeImage.tsx
Normal file
41
remix/app/components/FullSizeImage.tsx
Normal file
@@ -0,0 +1,41 @@
|
||||
import { ModalBody, ModalHeader } from "@contentstack/venus-components";
|
||||
|
||||
export default function FullSizeImage({
|
||||
title,
|
||||
onClose,
|
||||
imageUrl,
|
||||
alt,
|
||||
aspectRatio,
|
||||
}: {
|
||||
title: string;
|
||||
onClose: () => void;
|
||||
imageUrl: string;
|
||||
alt: string;
|
||||
aspectRatio: number;
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
<ModalHeader title={title} closeModal={onClose} />
|
||||
<ModalBody
|
||||
id="fullsize-image"
|
||||
style={{
|
||||
maxHeight: "inherit",
|
||||
borderRadius: "50px",
|
||||
display: "flex",
|
||||
justifyContent: "center",
|
||||
}}
|
||||
>
|
||||
<img
|
||||
src={imageUrl}
|
||||
style={{
|
||||
aspectRatio,
|
||||
maxWidth: "100%",
|
||||
maxHeight: "100%",
|
||||
objectFit: "contain",
|
||||
}}
|
||||
alt={alt}
|
||||
/>
|
||||
</ModalBody>
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user