import React from 'react'; import { doControl } from '../../actions/app-actions'; export default class NodeDetailsControlButton extends React.Component { constructor(props, context) { super(props, context); this.handleClick = this.handleClick.bind(this); } render() { let className = `node-control-button fa ${this.props.control.icon}`; if (this.props.pending) { className += ' node-control-button-pending'; } return ( ); } handleClick(ev) { ev.preventDefault(); doControl(this.props.control.probeId, this.props.control.nodeId, this.props.control.id); } }