aboutsummaryrefslogtreecommitdiffstats
path: root/graphgraph-fe/src/PopupSettings.js
blob: a278bc8f87ba60fb702598589543fc4f979272c8 (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 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