keep original proposal card design for v1 proposals (#89)
This commit is contained in:
parent
94dc22b879
commit
6f4e1b779b
|
@ -1,5 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Redirect } from 'react-router-dom';
|
import { Redirect } from 'react-router-dom';
|
||||||
|
import classnames from 'classnames';
|
||||||
|
import { Progress } from 'antd'
|
||||||
import { Proposal } from 'types';
|
import { Proposal } from 'types';
|
||||||
import Card from 'components/Card';
|
import Card from 'components/Card';
|
||||||
import UserAvatar from 'components/UserAvatar';
|
import UserAvatar from 'components/UserAvatar';
|
||||||
|
@ -21,6 +23,9 @@ export class ProposalCard extends React.Component<Proposal> {
|
||||||
team,
|
team,
|
||||||
target,
|
target,
|
||||||
contributionMatching,
|
contributionMatching,
|
||||||
|
isVersionTwo,
|
||||||
|
funded,
|
||||||
|
percentFunded
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -33,14 +38,40 @@ export class ProposalCard extends React.Component<Proposal> {
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
{isVersionTwo && (
|
||||||
<div className="ProposalCard-funding">
|
<div className="ProposalCard-funding">
|
||||||
<div className="ProposalCard-funding-raised">
|
<div className="ProposalCard-funding-raised">
|
||||||
<UnitDisplay value={target} symbol="ZEC" />
|
<UnitDisplay value={target} symbol="ZEC" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{!isVersionTwo && (
|
||||||
|
<>
|
||||||
|
<div className="ProposalCard-funding-v1">
|
||||||
|
<div className="ProposalCard-funding-v1-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}%
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<Progress
|
||||||
|
percent={percentFunded}
|
||||||
|
status={percentFunded >= 100 ? 'success' : 'active'}
|
||||||
|
showInfo={false}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
|
||||||
<div className="ProposalCard-team">
|
<div className="ProposalCard-team">
|
||||||
<div className="ProposalCard-team-name">
|
<div className={`ProposalCard-team-name${isVersionTwo ? '' : '-v1'}`}>
|
||||||
{team[0].displayName}{' '}
|
{team[0].displayName}{' '}
|
||||||
{team.length > 1 && <small>+{team.length - 1} other</small>}
|
{team.length > 1 && <small>+{team.length - 1} other</small>}
|
||||||
</div>
|
</div>
|
||||||
|
@ -48,7 +79,7 @@ export class ProposalCard extends React.Component<Proposal> {
|
||||||
{[...team].reverse().map((u, idx) => (
|
{[...team].reverse().map((u, idx) => (
|
||||||
<UserAvatar
|
<UserAvatar
|
||||||
key={idx}
|
key={idx}
|
||||||
className="ProposalCard-team-avatars-avatar"
|
className={`ProposalCard-team-avatars-avatar${isVersionTwo ? '' : '-v1'}`}
|
||||||
user={u}
|
user={u}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
|
|
|
@ -49,6 +49,19 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&-name-v1 {
|
||||||
|
opacity: 0.8;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
|
||||||
|
small {
|
||||||
|
opacity: 0.6;
|
||||||
|
font-size: 0.6rem;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
&-avatars {
|
&-avatars {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row-reverse;
|
flex-direction: row-reverse;
|
||||||
|
@ -61,6 +74,14 @@
|
||||||
border-radius: 100%;
|
border-radius: 100%;
|
||||||
border: 2px solid #fff;
|
border: 2px solid #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&-avatar-v1 {
|
||||||
|
width: 1.8rem;
|
||||||
|
height: 1.8rem;
|
||||||
|
margin-left: -0.75rem;
|
||||||
|
border-radius: 100%;
|
||||||
|
border: 2px solid #fff;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,6 +110,31 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&-funding-v1 {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
line-height: 1.9rem;
|
||||||
|
|
||||||
|
&-raised {
|
||||||
|
font-size: 0.9rem;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
|
||||||
|
small {
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&-percent {
|
||||||
|
font-size: 0.7rem;
|
||||||
|
padding-left: 0.25rem;
|
||||||
|
&.is-funded {
|
||||||
|
color: @success-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
&-address {
|
&-address {
|
||||||
font-size: 0.7rem;
|
font-size: 0.7rem;
|
||||||
margin-right: 2.5rem;
|
margin-right: 2.5rem;
|
||||||
|
|
Loading…
Reference in New Issue