Skip to content

Commit

Permalink
Merge branch 'master' of github.com:aragon/aragon-apps
Browse files Browse the repository at this point in the history
  • Loading branch information
onbjerg committed Mar 21, 2018
2 parents f9f7a6d + 32ccee1 commit c1182cc
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions apps/voting/app/src/components/VoteRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class VoteRow extends React.Component {
render() {
const { vote } = this.props
const { endDate, open } = vote
const { metadata: question, nay, totalVoters, yea } = vote.data
const { metadata: question, description, nay, totalVoters, yea } = vote.data
const totalVotes = safeDiv(yea + nay, totalVoters)

return (
Expand All @@ -25,7 +25,14 @@ class VoteRow extends React.Component {
{open ? <Countdown end={endDate} /> : <VoteStatus vote={vote} />}
</StatusCell>
<QuestionCell>
<QuestionWrapper>{question}</QuestionWrapper>
<div>
<QuestionWrapper>
{description ? <strong>{question}</strong> : question}
</QuestionWrapper>
{description && (
<DescriptionWrapper>{description}</DescriptionWrapper>
)}
</div>
</QuestionCell>
<Cell align="right">{Math.round(totalVotes * 10000) / 100}%</Cell>
<BarsCell>
Expand Down Expand Up @@ -77,12 +84,17 @@ const ActionsCell = styled(Cell)`
width: 0;
`

const QuestionWrapper = styled.div`
const QuestionWrapper = styled.p`
margin-right: 20px;
word-break: break-all;
hyphens: auto;
`

const DescriptionWrapper = styled.p`
margin-top: 10px;
margin-right: 20px;
`

const BarsGroup = styled.div`
width: 100%;
`
Expand Down

0 comments on commit c1182cc

Please sign in to comment.