Redesign Proposal Card (#73)

This commit is contained in:
Danny Skubak 2019-11-20 16:39:37 -05:00 committed by Daniel Ternyak
parent 13d762b011
commit 4702f1a752
2 changed files with 7 additions and 24 deletions

View File

@ -1,6 +1,4 @@
import React from 'react';
import classnames from 'classnames';
import { Progress } from 'antd';
import { Redirect } from 'react-router-dom';
import { Proposal } from 'types';
import Card from 'components/Card';
@ -22,9 +20,7 @@ export class ProposalCard extends React.Component<Proposal> {
dateCreated,
team,
target,
funded,
contributionMatching,
percentFunded,
} = this.props;
return (
@ -39,23 +35,9 @@ export class ProposalCard extends React.Component<Proposal> {
)}
<div className="ProposalCard-funding">
<div className="ProposalCard-funding-raised">
<UnitDisplay value={funded} symbol="ZEC" /> <small>raised</small> of{' '}
<UnitDisplay value={target} symbol="ZEC" /> goal
</div>
<div
className={classnames({
['ProposalCard-funding-percent']: true,
['is-funded']: percentFunded >= 100,
})}
>
{percentFunded}%
<UnitDisplay value={target} symbol="ZEC" />
</div>
</div>
<Progress
percent={percentFunded}
status={percentFunded >= 100 ? 'success' : 'active'}
showInfo={false}
/>
<div className="ProposalCard-team">
<div className="ProposalCard-team-name">

View File

@ -40,6 +40,7 @@
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: 1rem;
small {
opacity: 0.6;
@ -54,8 +55,8 @@
margin-left: 1.25rem;
&-avatar {
width: 1.8rem;
height: 1.8rem;
width: 2.5rem;
height: 2.5rem;
margin-left: -0.75rem;
border-radius: 100%;
border: 2px solid #fff;
@ -65,11 +66,11 @@
&-funding {
display: flex;
justify-content: space-between;
line-height: 1.2rem;
justify-content: center;
line-height: 2.5rem;
&-raised {
font-size: 0.9rem;
font-size: 2.2rem;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;