import React from "react"; import styles from "./Facepile.module.css"; import classNames from "classnames"; import { Avatar, sizes } from "./Avatar"; const overlapMap = { xs: 2, sm: 4, md: 8, }; export function Facepile({ className, client, participants, max, size, ...rest }) { const _size = sizes.get(size); const _overlap = overlapMap[size]; return (
member.name).join(", ")} style={{ width: participants.length * (_size - _overlap) + _overlap }} {...rest} > {participants.slice(0, max).map((member, i) => { const avatarUrl = member.user?.avatarUrl; return ( ); })} {participants.length > max && ( )}
); } Facepile.defaultProps = { max: 3, size: "xs", };