Move poll option styling to css file

This commit is contained in:
Tim Vahlbrock 2024-11-01 12:47:14 +01:00
parent 22729f4513
commit 3730cb4653
No known key found for this signature in database
2 changed files with 19 additions and 12 deletions

View file

@ -35,6 +35,14 @@ Please see LICENSE files in the repository root for full details.
justify-content: space-between;
}
.mx_PollOption_votesWrapper {
display: flex;
}
.mx_PollOption_facePile {
margin-right: $spacing-8
}
.mx_PollOption_optionVoteCount {
color: $secondary-content;
font-size: $font-12px;

View file

@ -33,22 +33,21 @@ const PollOptionContent: React.FC<PollOptionContentProps> = ({ isWinner, answer,
return (
<div className="mx_PollOption_content">
<div className="mx_PollOption_optionText">{answer.text}</div>
<div>
<div style={{ display: "flex" }}>
{displayVoteCount
&& members.length <= MAXIMUM_MEMBERS_FOR_FACE_PILE
&& <FacePile
<div className="mx_PollOption_votesWrapper">
{displayVoteCount
&& members.length <= MAXIMUM_MEMBERS_FOR_FACE_PILE
&& <div className="mx_PollOption_facePile">
<FacePile
members={members.filter((m) => votes.some((v) => v.sender === m.userId))}
size="24px"
overflow={false}
style={{ marginRight: "10px" }}
/>
}
<span className="mx_PollOption_optionVoteCount">
{isWinner && <TrophyIcon className="mx_PollOption_winnerIcon" />}
{votesText}
</span>
</div>
</div>
}
<span className="mx_PollOption_optionVoteCount">
{isWinner && <TrophyIcon className="mx_PollOption_winnerIcon" />}
{votesText}
</span>
</div>
</div>
);