import React from 'react'; import clsx from 'clsx'; import Image from 'next/image'; import { LandingBentoGridItem, ItemVariant } from './LandingBentoGridItem'; /** * A specialized bento grid item with optional top text, center image, and bottom text. * Text elements can have different color variants (default, primary, secondary). */ export function LandingBentoGridImageItem({ topText, topTextComponent, imageSrc, imageAlt = '', imageComponent, imageFill = true, imageHeight = 400, imageWidth = 400, bottomText, bottomTextComponent, colSpan, rowSpan, className, href, variant = 'default', asChild = false, children, ...props }: { topText?: string; topTextComponent?: React.ReactNode; imageSrc?: string; imageAlt?: string; imageComponent?: React.ReactNode; imageFill?: boolean; imageHeight?: number; imageWidth?: number; bottomText?: string; bottomTextComponent?: React.ReactNode; colSpan?: 1 | 2 | 3 | 4; rowSpan?: 1 | 2 | 3; className?: string; href?: string; variant?: ItemVariant; asChild?: boolean; children?: React.ReactNode; }) { const content = (
{topTextComponent || (
{topText}
)} {imageComponent || (imageSrc && (
{imageAlt}
))} {bottomTextComponent || (
{bottomText}
)}
); return ( {children} ); }