Skip to content

OpenPanel is an open-source web and product analytics platform, an open-source alternative to Mixpanel with optional self-hosting.

549 B
Raw Blame
import Image from 'next/image';
import { cn } from '@/lib/utils';

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