epn-ui
Version:
Дизайн система кабинета ВМ
18 lines (15 loc) • 693 B
JavaScript
import { __rest, __assign } from '../../_virtual/_tslib.js';
import React from 'react';
import Modal from 'antd/lib/modal';
var DIALOG_WIDTH = {
lg: 770,
md: 688,
sm: 512,
xs: 448,
};
var BaseDialog = function (_a) {
var style = _a.style, children = _a.children, _b = _a.size, size = _b === void 0 ? 'lg' : _b, _c = _a.footer, footer = _c === void 0 ? null : _c, props = __rest(_a, ["style", "children", "size", "footer"]);
return (React.createElement(Modal, __assign({ destroyOnClose: true, centered: true, width: DIALOG_WIDTH[size], style: style, footer: footer }, props), children));
};
var Dialog = BaseDialog;
export { BaseDialog, Dialog as default };