summaryrefslogtreecommitdiff
path: root/app/client/common/paramGroup.component.js
blob: ccff0b022ddc16c53bc6c599008c3fccb23df757 (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
28
29
import { h, Component } from 'preact'
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'
import * as liveActions from '../live/actions'

class ParamGroup extends Component {
  render() {
    const props = this.props
    return (
      <div class='paramGroup'>
        <label>
          <h3>{props.title}</h3>
          <input type='checkbox' />
        </label>
        {props.children}
      </div>
    )
  }
}

const mapStateToProps = state => ({
  opt: state.live.opt,
})

const mapDispatchToProps = (dispatch, ownProps) => ({
  actions: bindActionCreators(liveActions, dispatch)
})

export default connect(mapStateToProps, mapDispatchToProps)(ParamGroup)