Merge pull request #453 from vector-im/dbkr/fix_facepile_display

Fix facepile display issues
This commit is contained in:
David Baker 2022-07-08 09:59:11 +01:00 committed by GitHub
commit 572caf6826
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -24,7 +24,11 @@ export function Facepile({
<div
className={classNames(styles.facepile, styles[size], className)}
title={participants.map((member) => member.name).join(", ")}
style={{ width: participants.length * (_size - _overlap) + _overlap }}
style={{
width:
Math.min(participants.length, max + 1) * (_size - _overlap) +
_overlap,
}}
{...rest}
>
{participants.slice(0, max).map((member, i) => {

View file

@ -28,6 +28,7 @@
display: flex;
flex-direction: column;
margin: 20px;
text-align: center;
}
.participants > p {