import React, { Component } from 'react';
import Dialog from 'material-ui/lib/dialog';
import FlatButton from 'material-ui/lib/flat-button';
import RaisedButton from 'material-ui/lib/raised-button';

// NOTE: For emit `onTouchTap` event.
import injectTapEventPlugin from 'react-tap-event-plugin';
injectTapEventPlugin();

export default class PromoteModal extends Component {
  constructor(props) {
    super(props);
    this.state = { open: false };
  }

  closeModal() {
    this.props.onHidePromoteModal();
  }

  render() {
    const actions = [
      <FlatButton label="Cancel" primary={true} onTouchTap={this.handleClose.bind(this)} />,
      <FlatButton label="Submit" primary={true} onTouchTap={this.handleClose.bind(this)} />
    ];

    return (
      <div>
        <Dialog title="" actions={actions} modal={true} open={this.props.open} />
      </div>
    );
  }
}

@@ -508,16 +508,144 @@
 );%0A  %7D%0A%0A
+  promotePiece() %7B%0A    this.props.promotePiece();%0A    this.closeModal();%0A  %7D%0A%0A  notPromotePiece() %7B%0A    this.closeModal();%0A  %7D%0A%0A
   render
@@ -700,14 +700,10 @@
 el=%22
-Cancel
+No
 %22 pr
@@ -728,34 +728,38 @@
 chTap=%7Bthis.
-handleClos
+notPromotePiec
 e.bind(this)
@@ -793,14 +793,11 @@
 el=%22
-Submit
+Yes
 %22 pr
@@ -830,18 +830,19 @@
 his.
-handleClos
+promotePiec
 e.bi

Add `promotePiece`, `not`romotePiece` action.