import React from 'react'; import {Button, Input, InputGroup, InputGroupAddon, Table} from 'reactstrap'; export function EditableMatchTable(props) { return (
{props.match.team1.name}
{props.match.team2.name}
); } class ScoreInput extends React.Component { constructor(props) { super(props); this.state = {score: this.props.score}; this.updateScore = this.updateScore.bind(this); this.increaseScore = this.increaseScore.bind(this); this.decreaseScore = this.decreaseScore.bind(this); } updateScore(event) { this.setState({score: event.target.value}); } increaseScore() { this.setState({score: Number(this.state.score) + 1}); } decreaseScore() { this.setState({score: Number(this.state.score) - 1}); } render() { return ( ); } }