'use strict'; var React = require('react'); var Dialog = require('rc-dialog'); var div; module.exports = function (props) { var d; props = props || {}; props.iconClassName = props.iconClassName || 'anticon-exclamation-circle'; var width = props.width || 375; function close() { d.setState({ visible: false }); } function onCancel() { var cancelFn = props.onCancel; if (cancelFn) { var ret; if (cancelFn.length) { ret = cancelFn(close); } else { ret = cancelFn(); if (!ret) { close(); } } if (ret && ret.then) { ret.then(close); } } else { close(); } } function onOk() { var okFn = props.onOk; if (okFn) { var ret; if (okFn.length) { ret = okFn(close); } else { ret = okFn(); if (!ret) { close(); } } if (ret && ret.then) { ret.then(close); } } else { close(); } } var body =