aboutsummaryrefslogtreecommitdiffstats
path: root/graphgraph-fe/src/PopupSettings.js
blob: cb8a53361640c2e4783f9aec112e2e9dbf4f5d61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import React from 'react'
import Popup from 'reactjs-popup'
import './PopupSettings.css'
import GraphHops from './GraphHops'

class PopupMenu extends React.Component {
  render () {
    return (
      <Popup trigger={<button className='settings-button' disabled={this.props.isDisabled}>Hops</button>} position="bottom right">
        {close => (
          <div>
            <GraphHops edgeFilter={this.props.edgeFilter} parentHops={this.props.parentHops} childHops={this.props.childHops} cousinHops={this.props.cousinHops} updateHops={this.props.updateHops} />
            <button
              type="button"
              className="link-button, close"
              onClick={close}>
          &times;
            </button>
          </div>
        )}
      </Popup>

    )
  }
}

export default PopupMenu