Skip to content
This repository was archived by the owner on Jun 24, 2022. It is now read-only.

Style update + hide approve button for ETH. #2171

Merged
merged 2 commits into from
Jan 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions src/custom/pages/Claim/InvestmentFlow/InvestOption.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ export default function InvestOption({ approveData, updateInvestAmount, claim }:
return (
<InvestTokenGroup>
<div>
<h3>Buy vCOW with {currencyAmount?.currency?.symbol}</h3>
<span>
<TokenLogo symbol={currencyAmount?.currency?.symbol || '-'} size={72} />
<CowProtocolLogo size={72} />
</span>
<h3>Buy vCOW with {currencyAmount?.currency?.symbol}</h3>
</div>

<span>
Expand All @@ -110,6 +110,14 @@ export default function InvestOption({ approveData, updateInvestAmount, claim }:
{formatSmart(price)} vCoW per {currencyAmount?.currency?.symbol}
</i>
</span>

<span>
<b>Max. investment available</b>{' '}
<i>
{formatSmart(maxCost) || '0'} {currencyAmount?.currency?.symbol}
</i>
</span>

<span>
<b>Token approval</b>
{approveData ? (
Expand All @@ -131,7 +139,7 @@ export default function InvestOption({ approveData, updateInvestAmount, claim }:
</i>
)}
{/* Approve button - @biocom styles for this found in ./styled > InputSummary > ${ButtonPrimary}*/}
{approveState !== ApprovalState.APPROVED && (
{approveData && approveState !== ApprovalState.APPROVED && (
<ButtonConfirmed
buttonSize={ButtonSize.SMALL}
onClick={handleApprove}
Expand All @@ -142,18 +150,13 @@ export default function InvestOption({ approveData, updateInvestAmount, claim }:
>
{approving || approveState === ApprovalState.PENDING ? (
<Loader stroke="white" />
) : (
) : approveData ? (
<span>Approve {currencyAmount?.currency?.symbol}</span>
)}
) : null}
</ButtonConfirmed>
)}
</span>
<span>
<b>Max. investment available</b>{' '}
<i>
{formatSmart(maxCost) || '0'} {currencyAmount?.currency?.symbol}
</i>
</span>

<span>
<b>Available investment used</b>

Expand Down
22 changes: 17 additions & 5 deletions src/custom/pages/Claim/styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ export const ClaimTable = styled.div`
border-collapse: collapse;
min-width: 100%;
font-size: 16px;
grid-template-columns: min-content auto max-content auto;
grid-template-columns: min-content auto auto auto;
}

thead,
Expand All @@ -321,7 +321,7 @@ export const ClaimTable = styled.div`
background: transparent;
text-align: left;
font-weight: normal;
font-size: 13px;
font-size: 15px;
color: ${({ theme }) => theme.text1};
position: relative;
}
Expand Down Expand Up @@ -666,6 +666,12 @@ export const ClaimBreakdown = styled.div`
display: flex;
width: 100%;
flex-flow: column wrap;

> h2 {
font-size: 28px;
font-weight: 500;
text-align: center;
}
`

export const FooterNavButtons = styled.div`
Expand Down Expand Up @@ -724,6 +730,12 @@ export const Demo = styled(ClaimTable)`
export const InvestFlow = styled.div`
display: flex;
flex-flow: column wrap;

h1 {
font-size: 28px;
font-weight: 500;
text-align: center;
}
`

export const InvestContent = styled.div`
Expand Down Expand Up @@ -879,20 +891,20 @@ export const InvestSummary = styled.div`
display: grid;
grid-template-columns: auto auto;
font-size: 15px;
gap: 12px;
gap: 16px 36px;

> span {
display: flex;
flex-flow: column wrap;
margin: 0 0 12px;
color: ${({ theme }) => transparentize(0.1, theme.text1)};
gap: 3px;
}

> span > ${ButtonPrimary} {
margin: 12px 0;
margin: 12px 0 12px -9px;
padding: 6px;
font-size: 16px;
max-width: 154px;
}

> span > i {
Expand Down