import { cn } from "@/editor/lib/utils"; import { Typography } from "@/editor/theme/Typography"; export type ImageGalleryProps = { tagline: string; heading: string; subheading: string; layout: "grid" | "masonry" | "editorial"; items: Array<{ src: string; alt: string; caption?: string }>; }; export function ImageGallery({ tagline, heading, subheading, layout, items }: ImageGalleryProps) { return (
{(tagline || heading || subheading) && (
{tagline ? (

{tagline}

) : null} {heading ? {heading} : null} {subheading ? ( {subheading} ) : null}
)} {layout === "masonry" ? (
{items.map((it, i) => (
{it.alt} {it.caption ? (
{it.caption}
) : null}
))}
) : layout === "editorial" ? (
{items.slice(0, 5).map((it, i) => (
{it.alt}
))}
) : (
{items.map((it, i) => (
{it.alt} {it.caption ? (
{it.caption}
) : null}
))}
)}
); }