import classNames from 'classnames'; import { useRef } from 'react'; export interface ImageFigureProps { srcSet: string; alt: string; className?: string; loading?: 'lazy' | 'eager'; children?: React.ReactNode; } export function ImageFigure({ alt, srcSet, children, className, loading }: ImageFigureProps) { const refDialog = useRef(null); return (
{alt} refDialog?.current?.showModal()} /> {children &&
{children}
}

查看图片

{alt} {children &&
{children}
}
); }