@coreui/react
Version:
UI Components Library for React.js
36 lines (32 loc) • 1.52 kB
JavaScript
var tslib_es6 = require('../../node_modules/tslib/tslib.es6.js');
var React = require('react');
var PropTypes = require('prop-types');
var index = require('../../_virtual/index.js');
var CModalDialog = React.forwardRef(function (_a, ref) {
var _b;
var children = _a.children, alignment = _a.alignment, className = _a.className, fullscreen = _a.fullscreen, scrollable = _a.scrollable, size = _a.size, rest = tslib_es6.__rest(_a, ["children", "alignment", "className", "fullscreen", "scrollable", "size"]);
return (React.createElement("div", tslib_es6.__assign({ className: index.default('modal-dialog', (_b = {
'modal-dialog-centered': alignment === 'center'
},
_b[typeof fullscreen === 'boolean'
? 'modal-fullscreen'
: "modal-fullscreen-".concat(fullscreen, "-down")] = fullscreen,
_b['modal-dialog-scrollable'] = scrollable,
_b["modal-".concat(size)] = size,
_b), className) }, rest, { ref: ref }), children));
});
CModalDialog.propTypes = {
alignment: PropTypes.oneOf(['top', 'center']),
children: PropTypes.node,
className: PropTypes.string,
fullscreen: PropTypes.oneOfType([
PropTypes.bool,
PropTypes.oneOf(['sm', 'md', 'lg', 'xl', 'xxl']),
]),
scrollable: PropTypes.bool,
size: PropTypes.oneOf(['sm', 'lg', 'xl']),
};
CModalDialog.displayName = 'CModalDialog';
exports.CModalDialog = CModalDialog;
//# sourceMappingURL=CModalDialog.js.map
;