Browse Source

fix(payment): update payment modal styles

renovate/lint-staged-8.x
Jack Mallers 7 years ago
parent
commit
39154b688a
  1. 78
      app/components/Activity/PaymentModal.js
  2. 197
      app/components/Activity/PaymentModal.scss
  3. 1
      app/components/Activity/TransactionModal.scss

78
app/components/Activity/PaymentModal.js

@ -1,8 +1,16 @@
import React from 'react' import React from 'react'
import PropTypes from 'prop-types' import PropTypes from 'prop-types'
import Moment from 'react-moment'
import 'moment-timezone'
import { FaAngleDown } from 'react-icons/lib/fa' import { FaAngleDown } from 'react-icons/lib/fa'
import Isvg from 'react-inlinesvg'
import paperPlane from 'icons/paper_plane.svg'
import zap from 'icons/zap.svg'
import { blockExplorer } from 'utils'
import Value from 'components/Value' import Value from 'components/Value'
import styles from './PaymentModal.scss' import styles from './PaymentModal.scss'
@ -21,45 +29,47 @@ const PaymentModal = ({
} }
}) => ( }) => (
<div className={styles.container}> <div className={styles.container}>
<div className={styles.content}> <header className={styles.header}>
<section className={styles.top}> <section>
<div className={styles.details}> <Isvg src={paperPlane} />
<section className={styles.amount}> <span>Sent</span>
<h1>
<i className={styles.symbol}>-</i>
<Value value={payment.value} currency={ticker.currency} currentTicker={currentTicker} />
</h1>
<section className={styles.currentCurrency} onClick={() => setActivityModalCurrencyFilters(!showCurrencyFilters)}>
<span>{currencyName}</span><span><FaAngleDown /></span>
</section>
<ul className={showCurrencyFilters && styles.active}>
{
currentCurrencyFilters.map(filter =>
<li key={filter.key} onClick={() => onCurrencyFilterClick(filter.key)}>{filter.name}</li>)
}
</ul>
</section>
<section className={styles.fee}>
<p>Sent</p>
<p>
<Value value={payment.fee} currency={ticker.currency} currentTicker={currentTicker} />
<span> {currencyName} fee</span>
</p>
</section>
</div>
</section> </section>
<section className={styles.bottom}> <section className={styles.details}>
<div className={styles.txHash}> <div>
<h4>Memo</h4> <Isvg src={zap} />
<p>{payment.memo}</p> <span className={styles.zap}>Lightning Network</span>
</div> </div>
<div>
<div className={styles.blockHash}> <Value value={payment.fee} currency={ticker.currency} currentTicker={currentTicker} />
<h4>Proof</h4> <span> {currencyName} fee</span>
<p>{payment.payment_preimage}</p>
</div> </div>
</section> </section>
</header>
<div className={styles.amount}>
<h1>
<i className={`${styles.symbol} ${payment.value > 0 && styles.active}`}>-</i>
<Value value={payment.value} currency={ticker.currency} currentTicker={currentTicker} />
</h1>
<section className={styles.currentCurrency} onClick={() => setActivityModalCurrencyFilters(!showCurrencyFilters)}>
<span>{currencyName}</span><span><FaAngleDown /></span>
<ul className={showCurrencyFilters && styles.active}>
{
currentCurrencyFilters.map(filter =>
<li key={filter.key} onClick={() => onCurrencyFilterClick(filter.key)}>{filter.name}</li>)
}
</ul>
</section>
</div> </div>
<div className={styles.date}>
<Moment format='LLL'>{payment.creation_date * 1000}</Moment>
</div>
<footer className={styles.footer}>
<p>{payment.payment_preimage}</p>
</footer>
</div> </div>
) )

197
app/components/Activity/PaymentModal.scss

@ -1,123 +1,126 @@
@import '../../variables.scss'; @import '../../variables.scss';
@import '../../variables.scss';
.container { .container {
color: $white; color: $white;
} font-size: 12px;
width: 75%;
.content { margin: 0 auto;
background: $spaceblue; background: $spaceblue;
width: 85%; }
margin: 50px auto;
padding-top: 30px;
.top {
padding: 10px 60px;
.details {
display: flex;
flex-direction: row;
justify-content: space-between;
margin-bottom: 40px;
.amount {
display: flex;
flex-direction: row;
align-items: center;
position: relative;
.symbol {
color: $red;
}
h1 {
font-size: 40px;
margin-right: 10px;
}
.currentCurrency {
cursor: pointer;
transition: 0.25s all;
&:hover {
opacity: 0.5;
}
span {
font-size: 14px;
&:nth-child(1) {
font-weight: bold;
}
}
} .header {
display: flex;
flex-direction: row;
justify-content: space-between;
padding: 20px;
section {
&:nth-child(1) {
font-size: 16px;
color: $green;
svg {
width: 16px;
height: 16px;
vertical-align: top;
fill: $green;
}
ul { span:nth-child(2) {
visibility: hidden; margin-left: 5px;
position: absolute;
top: 40px;
right: -50px;
&.active {
visibility: visible;
}
li {
padding: 8px 15px;
background: #191919;
cursor: pointer;
transition: 0.25s hover;
border-bottom: 1px solid #0f0f0f;
&:hover {
background: #0f0f0f;
}
}
}
} }
}
.fee { &.details {
font-size: 12px; text-align: right;
text-align: right;
.notPaid { div:nth-child(1) {
color: #FF8A65; margin-bottom: 5px;
margin-top: 5px; }
}
p { svg {
margin-bottom: 5px; width: 12px;
height: 12px;
vertical-align: middle;
}
&:nth-child(2) { .zap {
opacity: 0.5; margin-left: 5px;
} cursor: pointer;
} transition: all 0.25s;
} }
} }
} }
} }
.bottom { .amount {
background: #31343f; margin-top: 50px;
padding: 40px; display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
padding: 20px;
.txHash, .blockHash { h1 {
margin: 40px 0; font-size: 40px;
}
h4 {
font-size: 10px; section {
margin-bottom: 10px; font-size: 20px;
margin-left: 10px;
position: relative;
cursor: pointer;
&:hover {
span {
opacity: 0.5;
}
} }
p { span {
font-size: 14px;
text-decoration: underline;
cursor: pointer;
transition: all 0.25s; transition: all 0.25s;
}
ul {
visibility: hidden;
position: absolute;
top: 40px;
right: -50px;
font-size: 12px;
&.active {
visibility: visible;
}
&:hover { li {
opacity: 0.5; padding: 8px 15px;
background: #191919;
cursor: pointer;
transition: 0.25s hover;
border-bottom: 1px solid #0f0f0f;
&:hover {
background: #0f0f0f;
}
} }
} }
} }
} }
.date {
text-align: center;
padding: 20px;
}
.footer {
background: #31343f;
margin: 20px 0 50px 0;
padding: 20px;
text-align: center;
p {
cursor: pointer;
}
}

1
app/components/Activity/TransactionModal.scss

@ -126,6 +126,7 @@
p { p {
text-decoration: underline; text-decoration: underline;
cursor: pointer; cursor: pointer;
transition: all 0.25s;
&:hover { &:hover {
opacity: 0.5; opacity: 0.5;

Loading…
Cancel
Save