import React from 'react'; import Dialog from 'rc-dialog'; var div; export default 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 =