import clsx from 'clsx'; import { GlowBg } from '@/components/shared/ui/glow-bg'; import { LandingTeamMember } from './LandingTeamMember'; import React from 'react'; /** * A component for the Team Members section of the landing page. * Displays heading, description, and a grid of team members. * Supports both passing a members array or using LandingTeamMember components as children. * * @example * // Using members array * * * // Using children components * * * * */ export type TeamMember = { name: string; role: string; imageSrc: string; }; export function LandingTeamSection({ className, innerClassName, title = 'Our Members', titleComponent, description = 'Our team is a tight-knit family of developers and visionaries, all bound by the same passion and enthusiasm.', descriptionComponent, members = [], textPosition = 'left', withBackground = false, withBackgroundGlow = false, variant = 'primary', backgroundGlowVariant = 'primary', children, }: { className?: string; innerClassName?: string; title?: string; titleComponent?: React.ReactNode; description?: string | React.ReactNode; descriptionComponent?: React.ReactNode; members?: TeamMember[]; textPosition?: 'center' | 'left'; withBackground?: boolean; withBackgroundGlow?: boolean; variant?: 'primary' | 'secondary'; backgroundGlowVariant?: 'primary' | 'secondary'; children?: React.ReactNode; }) { // Check if children are provided to render instead of the members array const hasChildrenToRender = React.Children.count(children) > 0; return (
{withBackgroundGlow ? (
) : null}
{title ? (

{title}

) : ( titleComponent )} {description ? (

{description}

) : ( descriptionComponent )}
{hasChildrenToRender ? children : members.map((member, index) => ( ))}
); }