Jack Mallers
7 years ago
8 changed files with 207 additions and 9 deletions
@ -0,0 +1,58 @@ |
|||||
|
import React from 'react' |
||||
|
import PropTypes from 'prop-types' |
||||
|
import Isvg from 'react-inlinesvg' |
||||
|
import { FaAngleDown, FaCircle } from 'react-icons/lib/fa' |
||||
|
import { btc } from 'utils' |
||||
|
import plus from 'icons/plus.svg' |
||||
|
import search from 'icons/search.svg' |
||||
|
import styles from './Network.scss' |
||||
|
|
||||
|
const Network = ({ channels, balance, currentTicker }) => { |
||||
|
console.log('channels: ', channels) |
||||
|
|
||||
|
return ( |
||||
|
<div className={styles.network}> |
||||
|
<header className={styles.header}> |
||||
|
<section> |
||||
|
<h2>My Network</h2> |
||||
|
<span className={styles.channelAmount}> |
||||
|
{btc.satoshisToBtc(balance.channelBalance)}BTC ≈ ${btc.satoshisToUsd(balance.channelBalance, currentTicker.price_usd).toLocaleString()} |
||||
|
</span> |
||||
|
</section> |
||||
|
<section className={styles.addChannel}> |
||||
|
<Isvg src={plus} /> |
||||
|
</section> |
||||
|
</header> |
||||
|
|
||||
|
<div className={styles.channels}> |
||||
|
<header className={styles.listHeader}> |
||||
|
<div> |
||||
|
<span>All <FaAngleDown /></span> |
||||
|
</div> |
||||
|
<div> |
||||
|
<span>Refresh</span> |
||||
|
</div> |
||||
|
</header> |
||||
|
|
||||
|
<ul> |
||||
|
{ |
||||
|
channels.channels.map(channel => { |
||||
|
console.log('channel: ', channel) |
||||
|
}) |
||||
|
} |
||||
|
</ul> |
||||
|
</div> |
||||
|
|
||||
|
<footer className={styles.search}> |
||||
|
<label htmlFor='search' className={`${styles.label} ${styles.input}`}> |
||||
|
<Isvg src={search} /> |
||||
|
</label> |
||||
|
<input id='search' type='text' className={`${styles.text} ${styles.input}`} placeholder='search by alias or pubkey' /> |
||||
|
</footer> |
||||
|
</div> |
||||
|
) |
||||
|
} |
||||
|
|
||||
|
Network.propTypes = {} |
||||
|
|
||||
|
export default Network |
@ -0,0 +1,124 @@ |
|||||
|
@import '../../variables.scss'; |
||||
|
|
||||
|
.network { |
||||
|
position: relative; |
||||
|
width: 20%; |
||||
|
display: inline-block; |
||||
|
vertical-align: top; |
||||
|
height: 100vh; |
||||
|
background: #31343f; |
||||
|
} |
||||
|
|
||||
|
.header { |
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
justify-content: space-between; |
||||
|
background: #2D303B; |
||||
|
padding: 10px 20px; |
||||
|
color: $white; |
||||
|
|
||||
|
h2 { |
||||
|
font-size: 14px; |
||||
|
font-weight: bold; |
||||
|
letter-spacing: 1.2px; |
||||
|
} |
||||
|
|
||||
|
.channelAmount { |
||||
|
font-size: 10px; |
||||
|
opacity: 0.5; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.channels { |
||||
|
padding: 20px; |
||||
|
|
||||
|
.listHeader { |
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
justify-content: space-between; |
||||
|
|
||||
|
span { |
||||
|
color: white; |
||||
|
opacity: 0.5; |
||||
|
font-size: 10px; |
||||
|
cursor: pointer; |
||||
|
|
||||
|
&:nth-child(1) { |
||||
|
opacity: 1; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
ul { |
||||
|
margin-top: 20px; |
||||
|
} |
||||
|
|
||||
|
.channel { |
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
justify-content: space-between; |
||||
|
color: $white; |
||||
|
padding: 10px 0; |
||||
|
margin: 10px 0; |
||||
|
|
||||
|
span:nth-child(1) { |
||||
|
font-size: 12px; |
||||
|
} |
||||
|
|
||||
|
.online { |
||||
|
color: $green; |
||||
|
} |
||||
|
|
||||
|
.pending { |
||||
|
color: $orange; |
||||
|
} |
||||
|
|
||||
|
.offline { |
||||
|
color: $darkestgrey; |
||||
|
} |
||||
|
|
||||
|
svg { |
||||
|
width: 5px; |
||||
|
height: 5px; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.search { |
||||
|
height: 55px; |
||||
|
padding: 2px 5px; |
||||
|
border-top: 0.5px solid #ccc; |
||||
|
|
||||
|
.input { |
||||
|
display: inline-block; |
||||
|
vertical-align: top; |
||||
|
height: 100%; |
||||
|
} |
||||
|
|
||||
|
.label { |
||||
|
width: 5%; |
||||
|
line-height: 50px; |
||||
|
font-size: 25px; |
||||
|
text-align: center; |
||||
|
cursor: pointer; |
||||
|
color: $white; |
||||
|
opacity: 0.5; |
||||
|
|
||||
|
svg { |
||||
|
width: 14px; |
||||
|
height:14px; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.text { |
||||
|
width: 90%; |
||||
|
background: transparent; |
||||
|
outline: 0; |
||||
|
padding: 0 5px; |
||||
|
border: 0; |
||||
|
border-radius: 0; |
||||
|
height: 50px; |
||||
|
font-size: 12px; |
||||
|
color: $white; |
||||
|
} |
||||
|
} |
After Width: | Height: | Size: 312 B |
Loading…
Reference in new issue