Files
stats/apps/public/components/figure.tsx
2024-11-13 21:15:46 +01:00

23 lines
445 B
TypeScript

import Image from 'next/image';
export function Figure({
src,
alt,
caption,
}: { src: string; alt: string; caption: string }) {
return (
<figure className="-mx-4">
<Image
src={src}
alt={alt}
width={1200}
height={800}
className="rounded-lg"
/>
<figcaption className="text-center text-sm text-muted-foreground mt-2">
{caption}
</figcaption>
</figure>
);
}