Browse Source

feature(channel search): hard code channel search bar style

renovate/lint-staged-8.x
Jack Mallers 7 years ago
parent
commit
dc4d82447b
  1. 22
      app/routes/channels/components/Channels.js
  2. 35
      app/routes/channels/components/Channels.scss
  3. 6
      app/routes/channels/containers/ChannelsContainer.js
  4. 2
      app/routes/wallet/containers/WalletContainer.js

22
app/routes/channels/components/Channels.js

@ -1,17 +1,33 @@
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { MdSearch } from 'react-icons/lib/md'
import styles from './Channels.scss'
class Channels extends Component {
componentWillMount() {}
componentWillMount() {
this.props.fetchChannels()
}
render() {
const {
channels
} = this.props
return (
<div>
<div className={styles.container}>
<div className={styles.search}>
<label className={`${styles.label} ${styles.input}`} htmlFor='invoiceSearch'>
<MdSearch />
</label>
<input
value={''}
onChange={event => console.log('event: ', event)}
className={`${styles.text} ${styles.input}`}
placeholder='Search channels by funding transaction, channel id, remote public key, etc'
type='text'
id='invoiceSearch'
/>
</div>
channels
</div>
)

35
app/routes/channels/components/Channels.scss

@ -0,0 +1,35 @@
@import '../../../variables.scss';
.container {
}
.search {
height: 75px;
padding: 2px;
border-bottom: 1px solid $darkgrey;
.input {
display: inline-block;
vertical-align: top;
height: 100%;
}
.label {
width: 5%;
line-height: 70px;
font-size: 25px;
text-align: center;
cursor: pointer;
}
.text {
width: 95%;
outline: 0;
padding: 0;
border: 0;
border-radius: 0;
height: 68px;
font-size: 18px;
}
}

6
app/routes/channels/containers/ChannelsContainer.js

@ -1,12 +1,18 @@
import { withRouter } from 'react-router'
import { connect } from 'react-redux'
import {
fetchChannels,
} from 'reducers/channels'
import Channels from '../components/Channels'
const mapDispatchToProps = {
fetchChannels
}
const mapStateToProps = state => ({
channels: state.channels
})
export default withRouter(connect(mapStateToProps, mapDispatchToProps)(Channels))

2
app/routes/wallet/containers/WalletContainer.js

@ -12,7 +12,6 @@ import {
} from 'reducers/peers'
import {
fetchChannels,
fetchPendingChannels,
setChannel,
channelsSelectors,
setChannelForm,
@ -30,7 +29,6 @@ const mapDispatchToProps = {
disconnectRequest,
fetchChannels,
fetchPendingChannels,
setChannel,
openChannel,
closeChannel,

Loading…
Cancel
Save