2016-05-20 12:42:26 -07:00
|
|
|
import React, { PropTypes } from 'react';
|
|
|
|
import { connect } from 'react-redux';
|
2016-03-05 21:06:04 -08:00
|
|
|
import { Button, ButtonGroup } from 'react-bootstrap';
|
|
|
|
import PureComponent from 'react-pure-render/component';
|
|
|
|
|
2016-05-20 12:42:26 -07:00
|
|
|
import { executeChallenge } from '../../redux/actions';
|
|
|
|
|
|
|
|
const bindableActions = { executeChallenge };
|
|
|
|
|
|
|
|
export class ToolPanel extends PureComponent {
|
2016-03-05 21:06:04 -08:00
|
|
|
static displayName = 'ToolPanel';
|
|
|
|
|
2016-05-20 12:42:26 -07:00
|
|
|
static propTypes = {
|
|
|
|
executeChallenge: PropTypes.func
|
|
|
|
};
|
|
|
|
|
2016-03-05 21:06:04 -08:00
|
|
|
render() {
|
2016-05-20 12:42:26 -07:00
|
|
|
const { executeChallenge } = this.props;
|
2016-03-05 21:06:04 -08:00
|
|
|
return (
|
|
|
|
<div>
|
|
|
|
<Button
|
|
|
|
block={ true }
|
|
|
|
bsStyle='primary'
|
2016-05-20 12:42:26 -07:00
|
|
|
className='btn-big'
|
2016-06-10 14:01:13 -07:00
|
|
|
onClick={ executeChallenge }
|
|
|
|
>
|
2016-03-05 21:06:04 -08:00
|
|
|
Run tests (ctrl + enter)
|
|
|
|
</Button>
|
|
|
|
<div className='button-spacer' />
|
|
|
|
<ButtonGroup
|
|
|
|
className='input-group'
|
2016-06-10 14:01:13 -07:00
|
|
|
justified={ true }
|
|
|
|
>
|
2016-03-05 21:06:04 -08:00
|
|
|
<Button
|
|
|
|
bsSize='large'
|
|
|
|
bsStyle='primary'
|
2016-06-10 14:01:13 -07:00
|
|
|
componentClass='label'
|
|
|
|
>
|
2016-03-05 21:06:04 -08:00
|
|
|
Reset
|
|
|
|
</Button>
|
|
|
|
<Button
|
|
|
|
bsSize='large'
|
|
|
|
bsStyle='primary'
|
2016-06-10 14:01:13 -07:00
|
|
|
componentClass='label'
|
|
|
|
>
|
2016-03-05 21:06:04 -08:00
|
|
|
Help
|
|
|
|
</Button>
|
|
|
|
<Button
|
|
|
|
bsSize='large'
|
|
|
|
bsStyle='primary'
|
2016-06-10 14:01:13 -07:00
|
|
|
componentClass='label'
|
|
|
|
>
|
2016-03-05 21:06:04 -08:00
|
|
|
Bug
|
|
|
|
</Button>
|
|
|
|
</ButtonGroup>
|
|
|
|
<div className='button-spacer' />
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
2016-05-20 12:42:26 -07:00
|
|
|
|
|
|
|
export default connect(null, bindableActions)(ToolPanel);
|