@coreui/react
Version:
UI Components Library for React.js
34 lines (31 loc) • 1.49 kB
JavaScript
import { __rest, __assign } from '../../node_modules/tslib/tslib.es6.js';
import React, { forwardRef } from 'react';
import PropTypes from 'prop-types';
import classNames from '../../_virtual/index.js';
var CModalDialog = 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 = __rest(_a, ["children", "alignment", "className", "fullscreen", "scrollable", "size"]);
return (React.createElement("div", __assign({ className: classNames('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';
export { CModalDialog };
//# sourceMappingURL=CModalDialog.js.map