import React from "react"; import Image from "next/image"; type ImageProps = Parameters[0]; export type ImageFigureProps = ImageProps & { caption?: string; margin?: number; captionSpacing?: number; shadow?: boolean; borderRadius?: boolean; }; export function ImageFigure(props: ImageFigureProps): React.ReactNode { const { caption, margin = 40, captionSpacing = null, shadow = false, borderRadius = false, ...rest } = props; return (
{/* eslint-disable-next-line jsx-a11y/alt-text */}
{caption && (
{caption}
)}
); }