import { cn } from "@/lib/utils"; import { fonts, ImageShapeName, imageShapes } from "@/front/lib/constants"; import { ImageProps } from "@/types/front"; import Button from "./Button"; type ImageAction = { label: string; href: string; }; type ThemeImageProps = { shape?: ImageShapeName; image: ImageProps; size?: string; action?: ImageAction; }; export default function Image({ shape = imageShapes.ROUNDED, image, action, size = "w-32 h-32", }: Readonly) { const customShape = shape === imageShapes.SQUARE ? "rounded-none" : "rounded-full"; const objectFit = "object-cover"; const lazyload = image.lazyload ? "lazy" : "eager"; return (
{image.alt} {action && ( <>
)}
); }