import { h, Component } from 'preact' import { connect } from 'react-redux' import { bindActionCreators } from 'redux' import * as liveActions from '../live/live.actions' class Checkbox extends Component { constructor(props){ super(props) this.handleClick = this.handleClick.bind(this) } handleClick(e){ clearTimeout(this.timeout) let new_value = e.target.checked this.props.onToggle && this.props.onToggle(new_value) } render() { const checked = this.props.value const dim = !this.props.noDim return (
) } } const mapStateToProps = state => ({ }) const mapDispatchToProps = (dispatch, ownProps) => ({ // actions: bindActionCreators(liveActions, dispatch) }) export default connect(mapStateToProps, mapDispatchToProps)(Checkbox)