in beta/src/components/MDX/Diagram.tsx [25:57]
export function Diagram({
name,
alt,
height,
width,
children,
captionPosition,
}: DiagramProps) {
return (
<figure className="flex flex-col px-0 p-0 sm:p-10 first:mt-0 mt-10 sm:mt-0 justify-center items-center">
{captionPosition === 'top' && <Caption text={children} />}
<div className="dark-image">
<Image
src={`/images/docs/diagrams/${name}.dark.svg`}
alt={alt}
height={height}
width={width}
/>
</div>
<div className="light-image">
<Image
src={`/images/docs/diagrams/${name}.svg`}
alt={alt}
height={height}
width={width}
/>
</div>
{(!captionPosition || captionPosition === 'bottom') && (
<Caption text={children} />
)}
</figure>
);
}