forked from prismicio-community/nextjs-starter-prismic-blog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PortfolioImage.tsx
29 lines (26 loc) · 815 Bytes
/
PortfolioImage.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import React from "react";
// @ts-ignore
import { Image, Transformation } from "cloudinary-react";
import cloudinary from "cloudinary-core";
// @ts-ignore
const cloudinaryCore = new cloudinary.Cloudinary({ cloud_name: "dadaboom" });
const PortfolioImage: React.FC<{ imgName: string; alt: string }> = ({
alt,
imgName,
}) => {
return (
<div className="group cursor-pointer">
<div className="overflow-hidden">
<Image
cloudName="dadaboom"
publicId={imgName}
className="img-responsive w-full transition-all duration-[0.6s] ease-[ease] group-hover:opacity-[0.8] group-hover:scale-[1.1]"
alt={alt}
>
<Transformation height="293" width="370" crop="scale" />
</Image>
</div>
</div>
);
};
export default PortfolioImage;