import React from 'react'; import clsx from 'clsx'; import { PageGrid, PageGridCol, PageGridRow } from 'shared/components/PageGrid/page-grid'; import { TileLogo, TileLogoProps } from '../../components/TileLogo/TileLogo'; import { ButtonGroup } from '../ButtonGroup/ButtonGroup'; export interface LogoItem extends TileLogoProps {} export interface LogoSquareGridProps { /** Color variant - determines background color */ variant?: 'gray' | 'green'; /** Optional heading text */ heading?: string; /** Optional description text */ description?: string; /** Primary button configuration */ primaryButton?: { label: string; href?: string; onClick?: () => void; }; /** Tertiary button configuration */ tertiaryButton?: { label: string; href?: string; onClick?: () => void; }; /** Array of logo items to display in the grid */ logos: LogoItem[]; /** Additional CSS classes */ className?: string; } /** * LogoSquareGrid Component * * A responsive grid pattern for displaying company/partner logos with an optional header section. * Features square tiles arranged in a responsive grid with 2 color variants and dark mode support. * * @example * // Basic usage with gray variant * * * @example * // With buttons and clickable logos * */ export const LogoSquareGrid: React.FC = ({ variant = 'gray', heading, description, primaryButton, tertiaryButton, logos, className = '', }) => { // Build class names using BEM with bds namespace const classNames = clsx( 'bds-logo-square-grid', `bds-logo-square-grid--${variant}`, className ); // Determine if we should show the header section const hasHeader = !!(heading || description || primaryButton || tertiaryButton); return ( {/* Header Section */} {hasHeader && ( {/* Text Content */} {(heading || description) && ( {heading && {heading}} {description && {description}} )} {/* Buttons */} )} {logos.map((logo, index) => ( ))} ); }; export default LogoSquareGrid;
{description}