import React, { Component, PropTypes } from 'react';
import { openModal } from 'actions/uiActions';
import Icon from 'utils/icons';
import ConfirmModal from '../Modals/ConfirmModal';

export default class DeleteIcon extends Component {
  static propTypes = {
    onClick: PropTypes.func.isRequired,
    message: PropTypes.string.isRequired,
    dispatch: PropTypes.func.isRequired,
  };

  constructor(props) {
    super(props);
    this.onClick = this.onClick.bind(this);
  }

  onClick() {
    const { onClick, message, dispatch } = this.props;
    dispatch(openModal(
      <ConfirmModal
        confirm={onClick}
        message={message}
      />),
    );
  }

  render() {
    return (
      <button className="table__delete" onClick={this.onClick}><Icon icon="circleWithLine" /></button>
    );
  }
}

@@ -321,27 +321,16 @@
 s.string
-.isRequired
 ,%0A    di
@@ -367,17 +367,71 @@
 red,%0A  %7D
-;
+%0A%0A  static defaultProps = %7B%0A    message: undefined,%0A  %7D
 %0A%0A  cons
@@ -741,16 +741,30 @@
  %3Cbutton
+ type=%22button%22
  classNa

Fix defaults for DeleteIcon message