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