import React from 'react'; import clsx from 'clsx'; import { LandingBentoGridItem, ItemVariant } from './LandingBentoGridItem'; export type ColorVariant = 'default' | 'primary' | 'secondary'; export interface LandingBentoGridIconItemProps { topText?: string; topTextComponent?: React.ReactNode; topTextVariant?: ColorVariant; icon?: React.ReactNode; iconVariant?: ColorVariant; bottomText?: string; bottomTextComponent?: React.ReactNode; bottomTextVariant?: ColorVariant; colSpan?: 1 | 2 | 3 | 4; rowSpan?: 1 | 2 | 3; className?: string; href?: string; variant?: ItemVariant; asChild?: boolean; children?: React.ReactNode; } /** * A specialized bento grid item with optional top text, center icon, and bottom text. * Each text and the icon can have different color variants (default, primary, secondary). */ export function LandingBentoGridIconItem({ topText, topTextComponent, icon, bottomText, bottomTextComponent, colSpan, rowSpan, className, href, variant = 'default', asChild = false, children, ...props }: LandingBentoGridIconItemProps) { const content = (
{topTextComponent || (
{topText}
)} {icon && (
{icon}
)} {bottomTextComponent || (
{bottomText}
)}
); return ( {children} ); }