@coreui/react-pro
Version:
UI Components Library for React.js
34 lines (30 loc) • 1.37 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');
const CModalDialog = React.forwardRef((_a, ref) => {
var { children, alignment, className, fullscreen, scrollable, size } = _a, rest = tslib_es6.__rest(_a, ["children", "alignment", "className", "fullscreen", "scrollable", "size"]);
return (React.createElement("div", Object.assign({ className: index.default('modal-dialog', {
'modal-dialog-centered': alignment === 'center',
[typeof fullscreen === 'boolean'
? 'modal-fullscreen'
: `modal-fullscreen-${fullscreen}-down`]: fullscreen,
'modal-dialog-scrollable': scrollable,
[`modal-${size}`]: size,
}, 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