Skip to content

Commit 3489f0e

Browse files
committed
refactor(web): voting-history-content-style
1 parent b01f6f0 commit 3489f0e

File tree

1 file changed

+12
-21
lines changed
  • web/src/pages/Cases/CaseDetails/Voting/VotesDetails

1 file changed

+12
-21
lines changed

web/src/pages/Cases/CaseDetails/Voting/VotesDetails/index.tsx

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -75,21 +75,20 @@ const AccordionContentContainer = styled.div`
7575
gap: 12px;
7676
`;
7777

78-
const LabelWrapper = styled.div`
79-
display: flex;
80-
gap: 4px;
81-
`;
82-
83-
const JustificationText = styled.label`
78+
const VotedText = styled.label`
8479
color: ${({ theme }) => theme.secondaryText};
8580
font-size: 16px;
86-
line-height: 1.25;
87-
flex: 1;
81+
::before {
82+
content: "Voted: ";
83+
color: ${({ theme }) => theme.primaryText};
84+
}
8885
`;
8986

90-
const StyledLabel = styled.label`
91-
color: ${({ theme }) => theme.primaryText};
92-
font-size: 16px;
87+
const JustificationText = styled(VotedText)`
88+
line-height: 1.25;
89+
::before {
90+
content: "Justification: ";
91+
}
9392
`;
9493

9594
const SecondaryTextLabel = styled.label`
@@ -115,18 +114,10 @@ const AccordionContent: React.FC<{
115114

116115
return (
117116
<AccordionContentContainer>
118-
{!isUndefined(choice) && (
119-
<LabelWrapper>
120-
<StyledLabel>Voted:&nbsp;</StyledLabel>
121-
<SecondaryTextLabel dir="auto">{getVoteChoice(parseInt(choice), answers)}</SecondaryTextLabel>
122-
</LabelWrapper>
123-
)}
117+
{!isUndefined(choice) && <VotedText dir="auto">{getVoteChoice(parseInt(choice), answers)}</VotedText>}
124118

125119
{justification ? (
126-
<LabelWrapper>
127-
<StyledLabel>Justification:&nbsp;</StyledLabel>
128-
<JustificationText dir="auto">{justification}</JustificationText>
129-
</LabelWrapper>
120+
<JustificationText dir="auto">{justification}</JustificationText>
130121
) : (
131122
<SecondaryTextLabel>No justification provided</SecondaryTextLabel>
132123
)}

0 commit comments

Comments
 (0)