diff --git a/src/components/Common/ProposalPreviewCard/ProposalPreviewCard.css b/src/components/Common/ProposalPreviewCard/ProposalPreviewCard.css index 71dcd8bb4..fae660c61 100644 --- a/src/components/Common/ProposalPreviewCard/ProposalPreviewCard.css +++ b/src/components/Common/ProposalPreviewCard/ProposalPreviewCard.css @@ -72,6 +72,11 @@ white-space: initial; } +.ProposalPreviewCard__DetailsItem { + display: inline-flex; + white-space: nowrap; +} + .ProposalPreviewCard__DetailsItem:after { content: 'ยท'; padding: 0 5px; @@ -100,3 +105,15 @@ color: var(--black-800) !important; margin-left: 2px !important; } + +.ProposalPreviewCard__DetailsItemVotedChoice { + max-width: 175px; +} + +.ProposalPreviewCard__Vote { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + margin-left: 2px; + color: var(--black-800); +} diff --git a/src/components/Common/ProposalPreviewCard/ProposalPreviewCard.tsx b/src/components/Common/ProposalPreviewCard/ProposalPreviewCard.tsx index 3a5603d5e..47a929b29 100644 --- a/src/components/Common/ProposalPreviewCard/ProposalPreviewCard.tsx +++ b/src/components/Common/ProposalPreviewCard/ProposalPreviewCard.tsx @@ -69,6 +69,18 @@ const ProposalPreviewCard = ({ proposal, votes, variant }: Props) => { )} + {showVotedChoice && ( + + {t('page.proposal_detail.your_vote_label')} + {userChoice} + + )} {t('page.home.open_proposals.votes', { total: Object.keys(votes || {}).length })} @@ -85,12 +97,6 @@ const ProposalPreviewCard = ({ proposal, votes, variant }: Props) => { > {dateText} - {showVotedChoice && ( - - {t('page.proposal_detail.your_vote_label')} - {userChoice} - - )}