class App extends React.Component {
modal(name,e) {
console.log(name,e);
}
render() {
return (
<button onClick={() => this.modal('auth','show')}>Войти</button>
)
}
}
...
onChangePeriodClick(period) {
console.log(period)
}
...
<button onClick={this.onChangePeriodClick.bind(this, 'Hours')} /> Hours </button>
...