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

Commit

Permalink
Misc styling (#2228)
Browse files Browse the repository at this point in the history
* Misc styling

* Fix duplicate import
  • Loading branch information
fairlighteth authored Jan 20, 2022
1 parent a116ab5 commit 5aab634
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 64 deletions.
6 changes: 3 additions & 3 deletions src/custom/assets/cow-swap/check.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/custom/pages/Claim/ClaimsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const ClaimsTableRow = ({
</td>
<td>
{' '}
<TokenLogo symbol={`${currencyAmount?.currency?.symbol}`} size={32} />
{!isFree && <TokenLogo symbol={`${currencyAmount?.currency?.symbol}`} size={32} />}
<CowProtocolLogo size={32} />
<span>
<b>{isFree ? ClaimType[type] : 'Buy vCOW'}</b>
Expand Down
5 changes: 3 additions & 2 deletions src/custom/pages/Claim/EligibleBanner.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Trans } from '@lingui/macro'
import { useClaimState } from 'state/claim/hooks'
import { CheckIcon, EligibleBanner as EligibleBannerWrapper } from './styled'
import { EligibleBanner as EligibleBannerWrapper } from './styled'
import CheckCircle from 'assets/cow-swap/check.svg'
import { ClaimStatus } from 'state/claim/actions'

export default function EligibleBanner({ hasClaims }: { hasClaims: boolean }) {
Expand All @@ -12,7 +13,7 @@ export default function EligibleBanner({ hasClaims }: { hasClaims: boolean }) {

return (
<EligibleBannerWrapper>
<CheckIcon />
<img src={CheckCircle} alt="eligible" />
<Trans>This account is eligible for vCOW token claims!</Trans>
</EligibleBannerWrapper>
)
Expand Down
12 changes: 0 additions & 12 deletions src/custom/pages/Claim/InvestmentFlow/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
InvestFlow,
InvestContent,
InvestFlowValidation,
InvestTokenSubtotal,
StepIndicator,
Steps,
ClaimTable,
Expand Down Expand Up @@ -149,17 +148,6 @@ export default function InvestmentFlow({ hasClaims, isAirdropOnly, ...tokenAppro
/>
))}

{/* TODO: Update this with real data */}
<InvestTokenSubtotal>
<h3>Investment summary</h3>
<span>
<b>Claim account:</b> {activeClaimAccount}
</span>
<span>
<b>vCOW to receive based on selected investment(s):</b> 4,054,671.28 vCOW
</span>
</InvestTokenSubtotal>

<InvestFlowValidation>Approve all investment tokens before continuing</InvestFlowValidation>
</InvestContent>
) : null}
Expand Down
72 changes: 26 additions & 46 deletions src/custom/pages/Claim/styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ export const PageWrapper = styled.div`
--active: ${({ theme }) => theme.primary1};
--active-inner: ${({ theme }) => theme.black};
--focus: 2px rgba(39, 94, 254, .3);
--border: ${({ theme }) => theme.bg4};
--border: ${({ theme }) => theme.blueShade3};
--border-hover: ${({ theme }) => theme.primary1};
--background: ${({ theme }) => theme.blueShade3};;
--background: ${({ theme }) => theme.white};
appearance: none;
height: 21px;
width: 21px;
Expand Down Expand Up @@ -279,15 +279,15 @@ export const ClaimTable = styled.div`
}
${TokenLogo} {
margin: 0 -26px 0 0;
margin: 0 -16px 0 0;
}
table {
display: grid;
border-collapse: collapse;
min-width: 100%;
font-size: 16px;
grid-template-columns: min-content auto auto auto;
grid-template-columns: min-content auto auto 240px;
}
thead,
Expand Down Expand Up @@ -343,7 +343,7 @@ export const ClaimTable = styled.div`
tr > td:nth-of-type(2) {
> span {
margin: 0 0 0 12px;
margin: 0 12px 0 0;
display: flex;
flex-flow: column wrap;
}
Expand Down Expand Up @@ -524,6 +524,10 @@ export const EligibleBanner = styled.div`
text-align: center;
margin: 0 auto 16px;
font-weight: 600;
> img {
margin: 0 4px 0 0;
}
`

export const InputField = styled.div`
Expand Down Expand Up @@ -752,6 +756,10 @@ export const InvestContent = styled.div`
flex-flow: column wrap;
gap: 3px;
> i {
font-style: normal;
}
&:last-child {
width: 100%;
}
Expand Down Expand Up @@ -848,7 +856,7 @@ export const InvestTokenGroup = styled.div`
}
${TokenLogo} {
margin: 0 -34px 0 0;
margin: 0 -36px 0 0;
}
> span {
Expand Down Expand Up @@ -903,7 +911,7 @@ export const InvestInput = styled.span`
margin: auto;
font-weight: normal;
color: ${({ theme }) => theme.text1};
background: ${({ theme }) => theme.blueShade3};
background: ${({ theme }) => theme.bg5};
border-radius: 12px;
padding: 0 12px;
height: 32px;
Expand All @@ -912,8 +920,7 @@ export const InvestInput = styled.span`
> div > label > input {
color: ${({ theme }) => theme.text1};
border: none;
border-radius: 12px;
padding: 12px 70px 5px 5px;
padding: 12px 70px 0 0;
font-size: 26px;
outline: 0;
background: transparent;
Expand Down Expand Up @@ -971,13 +978,14 @@ export const InvestAvailableBar = styled.div<{ percentage?: number }>`
position: relative;
height: 10px;
border-radius: 24px;
background: grey;
margin: 8px 0;
background: ${({ theme }) => (theme.currencyInput?.background ? theme.currencyInput?.background : theme.bg1)};
margin: 6px 0;
padding: 0 36px 0 0;
&::before {
content: '';
display: block;
background-color: ${({ theme }) => theme.primary1};
background-color: ${({ theme }) => theme.primary4};
height: 100%;
border-radius: 24px;
position: absolute;
Expand All @@ -991,16 +999,17 @@ export const InvestAvailableBar = styled.div<{ percentage?: number }>`
&::after {
content: ${({ percentage }) => (percentage ? `'${percentage}%'` : '0%')};
display: inline-block;
font-size: 11px;
color: white;
transform: translate(-120%, -20%);
position: absolute;
font-size: 13px;
color: ${({ theme }) => theme.primary1};
left: 100%;
}
`

export const InvestSummary = styled.div`
width: 100%;
display: grid;
grid-template-columns: auto auto;
grid-template-columns: repeat(2, 1fr);
font-size: 15px;
gap: 16px 36px;
Expand All @@ -1009,7 +1018,7 @@ export const InvestSummary = styled.div`
flex-flow: column wrap;
margin: 0 0 18px;
color: ${({ theme }) => transparentize(0.1, theme.text1)};
gap: 6px;
gap: 4px;
}
> span > ${ButtonPrimary} {
Expand Down Expand Up @@ -1045,35 +1054,6 @@ export const InvestFlowValidation = styled.div`
margin: 0 auto 16px;
`

export const InvestTokenSubtotal = styled.div`
display: flex;
flex-flow: column wrap;
color: ${({ theme }) => theme.text1};
width: 100%;
padding: 24px;
margin: 0 0 24px;
border-radius: 12px;
background: ${({ theme }) => theme.blueShade3};
font-size: 15px;
> h3 {
font-weight: 600;
font-size: 21px;
margin: 0 0 8px;
}
> span {
display: flex;
flex-flow: column wrap;
margin: 18px 0 0;
> b {
font-weight: 600;
margin: 0 0 3px;
}
}
`

export const ClaimAccountButtons = styled.div`
display: flex;
flex-direction: column;
Expand Down

0 comments on commit 5aab634

Please sign in to comment.