From af3bed7b5b1b01531e3bb34c56612c37717e06b7 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 21 May 2018 20:34:42 +0200 Subject: pauzejabber --- app/client/common/button.component.js | 36 +++++++++++++++++++++++++++++++++++ app/client/live/index.js | 20 +++++++++---------- 2 files changed, 46 insertions(+), 10 deletions(-) create mode 100644 app/client/common/button.component.js (limited to 'app') diff --git a/app/client/common/button.component.js b/app/client/common/button.component.js new file mode 100644 index 0000000..746a3f6 --- /dev/null +++ b/app/client/common/button.component.js @@ -0,0 +1,36 @@ +import { h, Component } from 'preact' +import { connect } from 'react-redux' +import { bindActionCreators } from 'redux' +import * as liveActions from '../live/actions' + +class Button extends Component { + constructor(props){ + super(props) + this.handleClick = this.handleClick.bind(this) + } + handleClick(e){ + this.props.onClick && this.props.onClick() + } + render() { + return ( +
+ +
+ ) + } +} + +const mapStateToProps = state => ({ +}) + +const mapDispatchToProps = (dispatch, ownProps) => ({ +}) + +export default connect(mapStateToProps, mapDispatchToProps)(Button) diff --git a/app/client/live/index.js b/app/client/live/index.js index 4fc1b5c..3a5dbd4 100644 --- a/app/client/live/index.js +++ b/app/client/live/index.js @@ -63,6 +63,12 @@ class App extends Component { title='view mode' options={['a','b','sequence','recursive']} /> + -