Include the control's id as an attr on the button

- To allow easy CSS selection of a particular button. We might want to
  hide it in some cases or give it a different color etc.
This commit is contained in:
Simon Howe
2019-01-22 16:22:58 +01:00
parent 2c65b28671
commit d86c263732

View File

@@ -12,14 +12,14 @@ class NodeDetailsControlButton extends React.Component {
}
render() {
const { icon, human } = this.props.control;
const { icon, id, human } = this.props.control;
const className = classNames('tour-step-anchor node-control-button', icon, {
// Old Agent / plugins don't include the 'fa ' prefix, so provide it if they don't.
fa: icon.startsWith('fa-'),
'node-control-button-pending': this.props.pending
});
return (
<i className={className} title={human} onClick={this.handleClick} />
<i className={className} data-id={id} title={human} onClick={this.handleClick} />
);
}