'use strict'; const React = require('react'); const Strategy = React.createClass({ propTypes: { strategy: React.PropTypes.object.isRequired, }, onRemove (evt) { evt.preventDefault(); if (window.confirm(`Are you sure you want to delete strategy '${this.props.strategy.name}'?`)) { // eslint-disable-line no-alert this.props.onRemove(this.props.strategy); } }, render () { return (
{this.props.strategy.name} (remove)
{this.props.strategy.description}
); }, }); module.exports = Strategy;