Move poll option styling to css file
This commit is contained in:
parent
22729f4513
commit
3730cb4653
2 changed files with 19 additions and 12 deletions
|
@ -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;
|
||||
|
|
|
@ -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>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue