Files
stats/apps/public/components/figure.tsx
2025-06-26 22:41:09 +02:00

25 lines
540 B
TypeScript

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