import React, { PropTypes } from 'react'; import { Button, ButtonGroup } from 'react-bootstrap'; import PureComponent from 'react-pure-render/component'; export default class ToolPanel extends PureComponent { constructor(...props) { super(...props); this.makeHint = this.makeHint.bind(this); this.makeReset = this.makeReset.bind(this); } static displayName = 'ToolPanel'; static propTypes = { executeChallenge: PropTypes.func, updateHint: PropTypes.func, hint: PropTypes.string }; makeHint() { this.props.makeToast({ message: this.props.hint }); this.props.updateHint(); } makeReset() { this.props.makeToast({ message: 'This will restore your code editor to its original state.', action: 'clear my code', actionCreator: 'resetChallenge' }); } renderHint(hint, makeHint) { if (!hint) { return null; } return ( ); } render() { const { hint, executeChallenge } = this.props; return (