import React from 'react'; import styles from './CommentBox.css'; import {Button} from 'react-mdl'; // Renders a comment box for creating a new comment export default class CommentBox extends React.Component { constructor (props) { super(props); this.state = {name: '', body: ''}; this.onSubmit = this.onSubmit.bind(this); } onSubmit () { const {name, body} = this.state; this.props.onSubmit({name, body}); this.setState({body: '', name: ''}); } render (props, {name, body}) { return (