import { ChevronRightIcon } from '@heroicons/react/24/outline'; import React from 'react'; import { Tags } from '../../../types/Tags'; import { Badge } from '../../Badge'; import { Link } from '../../Link/Link'; // Set types for as props type PeopleItemTypeProps = 'li' | 'div'; export interface PeopleItemsProps { as?: PeopleItemTypeProps; children?: React.ReactNode; firstName: string; lastName: string; jobTitle?: string; email?: string; phoneNumber?: string; tags?: Tags; profileImage?: string; link?: string; alt?: string; noImage?: boolean; } const styles = { imageWrapper: ``, imageGlobals: `h-20 w-20 apsect-square bg-cu-black-100 overflow-hidden border-4 border-white rounded-lg shadow-md @sm:md:h-28 @sm:md:w-28 @lg:md:h-60 @lg:md:w-60`, hasImage: `object-cover w-full h-full`, noImage: `w-full h-full flex items-center justify-center @sm:md:text-4xl font-semibold`, }; export const PeopleItems = ({ as: Component = 'div', firstName, lastName, email, phoneNumber, tags, jobTitle, profileImage, alt, link = '', noImage = false, }: PeopleItemsProps) => { const initials = `${firstName.split('')[0]}${lastName.split('')[0]}`; return ( {!noImage && ( <> {profileImage && (
{alt}
)} {!profileImage && (

{initials}

)} )}

{firstName + ' ' + lastName}

{jobTitle && (

{jobTitle}

)}
{tags?.category?.map(tag => ( {tag.name} ))}
); };