mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-01-11 03:26:14 +00:00
Swap Bity Promo w/ Shapeshift, Adjust Promo Display (#1115)
This commit is contained in:
parent
c5f32a9ce2
commit
3c5dd2743e
@ -1,17 +0,0 @@
|
||||
import React from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import BityLogo from 'assets/images/logo-bity-white.svg';
|
||||
|
||||
export const Bity: React.SFC = () => (
|
||||
<Link className="Promos-promo Promos-Bity" target="_blank" rel="noopener noreferrer" to="/swap">
|
||||
<div className="Promos-promo-inner">
|
||||
<div className="Promos-promo-text">
|
||||
<p>It’s now easier to get more ETH</p>
|
||||
<h5>Swap BTC <-> ETH</h5>
|
||||
</div>
|
||||
<div className="Promos-promo-images">
|
||||
<img src={BityLogo} />
|
||||
</div>
|
||||
</div>
|
||||
</Link>
|
||||
);
|
@ -1,11 +1,10 @@
|
||||
import React from 'react';
|
||||
import CoinbaseLogo from 'assets/images/logo-coinbase.svg';
|
||||
import { NewTabLink } from 'components/ui';
|
||||
|
||||
export const Coinbase: React.SFC = () => (
|
||||
<a
|
||||
className="Promos-promo Promos-Coinbase"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
<NewTabLink
|
||||
className="Promos-promo Promos--coinbase"
|
||||
href="https://buy.coinbase.com?code=60c05061-3a76-57be-b1cd-a7afa97bcb8c&address=0xA7DeFf12461661212734dB35AdE9aE7d987D648c&crypto_currency=ETH¤cy=USD"
|
||||
>
|
||||
<div className="Promos-promo-inner">
|
||||
@ -17,5 +16,5 @@ export const Coinbase: React.SFC = () => (
|
||||
<img src={CoinbaseLogo} />
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</NewTabLink>
|
||||
);
|
||||
|
@ -5,10 +5,7 @@ import ledgerLogo from 'assets/images/logo-ledger.svg';
|
||||
import trezorLogo from 'assets/images/logo-trezor.svg';
|
||||
|
||||
export const HardwareWallets: React.SFC = () => (
|
||||
<HelpLink
|
||||
className="Promos-promo Promos-HardwareWallets"
|
||||
article={HELP_ARTICLE.PROTECT_YOUR_FUNDS}
|
||||
>
|
||||
<HelpLink className="Promos-promo Promos--hardware" article={HELP_ARTICLE.PROTECT_YOUR_FUNDS}>
|
||||
<div className="Promos-promo-inner">
|
||||
<div className="Promos-promo-text">
|
||||
<h6>Learn more about protecting your funds.</h6>
|
||||
|
@ -0,0 +1,20 @@
|
||||
import React from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import ShapeshiftLogo from 'assets/images/logo-shapeshift.svg';
|
||||
|
||||
export const Shapeshift: React.SFC = () => (
|
||||
<Link className="Promos-promo Promos--shapeshift" to="/swap">
|
||||
<div className="Promos-promo-inner">
|
||||
<div className="Promos-promo-text">
|
||||
<h5>
|
||||
Exchange Coins
|
||||
<br />
|
||||
& Tokens with
|
||||
</h5>
|
||||
</div>
|
||||
<div className="Promos-promo-images">
|
||||
<img src={ShapeshiftLogo} />
|
||||
</div>
|
||||
</div>
|
||||
</Link>
|
||||
);
|
@ -1,3 +1,3 @@
|
||||
export * from './HardwareWallets';
|
||||
export * from './Coinbase';
|
||||
export * from './Bity';
|
||||
export * from './Shapeshift';
|
||||
|
@ -9,18 +9,6 @@
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
&-Bity {
|
||||
background-color: #006e79;
|
||||
}
|
||||
|
||||
&-Coinbase {
|
||||
background-color: #2b71b1;
|
||||
}
|
||||
|
||||
&-HardwareWallets {
|
||||
background-color: #6e9a3e;
|
||||
}
|
||||
|
||||
&-promo {
|
||||
position: relative;
|
||||
height: inherit;
|
||||
@ -42,19 +30,18 @@
|
||||
position: absolute;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
top: 50%;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
&-text,
|
||||
&-images {
|
||||
padding: 0 $space-sm;
|
||||
padding: 0 $space;
|
||||
}
|
||||
|
||||
&-text {
|
||||
flex: 1;
|
||||
flex: 5;
|
||||
padding-right: $space-xs;
|
||||
max-width: 220px;
|
||||
|
||||
p,
|
||||
h4,
|
||||
@ -73,15 +60,15 @@
|
||||
}
|
||||
|
||||
&-images {
|
||||
padding: 0 $space * 1.5;
|
||||
flex: 3;
|
||||
max-width: 108px;
|
||||
padding-left: $space-xs;
|
||||
|
||||
img {
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
max-width: 96px;
|
||||
height: auto;
|
||||
padding: $space-xs;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -106,6 +93,23 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Per-promo customizations
|
||||
&--shapeshift {
|
||||
background-color: #263A52;
|
||||
|
||||
.Promos-promo-images {
|
||||
max-width: 130px;
|
||||
}
|
||||
}
|
||||
|
||||
&--coinbase {
|
||||
background-color: #2b71b1;
|
||||
}
|
||||
|
||||
&--hardware {
|
||||
background-color: #6e9a3e;
|
||||
}
|
||||
}
|
||||
|
||||
.carousel-exit {
|
||||
|
@ -1,9 +1,9 @@
|
||||
import React from 'react';
|
||||
import { TransitionGroup, CSSTransition } from 'react-transition-group';
|
||||
import { HardwareWallets, Coinbase, Bity } from './PromoComponents';
|
||||
import { HardwareWallets, Coinbase, Shapeshift } from './PromoComponents';
|
||||
import './Promos.scss';
|
||||
|
||||
const promos = [HardwareWallets, Coinbase, Bity];
|
||||
const promos = [HardwareWallets, Coinbase, Shapeshift];
|
||||
|
||||
const CarouselAnimation = ({ children, ...props }) => (
|
||||
<CSSTransition {...props} timeout={300} classNames="carousel">
|
||||
@ -36,11 +36,7 @@ export default class Promos extends React.PureComponent<{}, State> {
|
||||
return (
|
||||
<div className="Promos">
|
||||
<TransitionGroup className="Promos-promo-wrapper">
|
||||
{promos
|
||||
.filter(i => {
|
||||
return i === promos[activePromo];
|
||||
})
|
||||
.map(promo => <CarouselAnimation key={Math.random()}>{promo}</CarouselAnimation>)}
|
||||
<CarouselAnimation key={Math.random()}>{promos[activePromo]}</CarouselAnimation>
|
||||
</TransitionGroup>
|
||||
<div className="Promos-nav">
|
||||
{promos.map((_, index) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user