@coreui/react
Version:
CoreUI React 17 Bootstrap 4 components
32 lines (28 loc) • 1.05 kB
JavaScript
import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { tagPropType } from '../utils/helper.js'; //component - CoreUI / CModalBody
var CModalBody = function CModalBody(props) {
var Tag = props.tag,
className = props.className,
innerRef = props.innerRef,
attributes = _objectWithoutPropertiesLoose(props, ["tag", "className", "innerRef"]); //render
var classes = classNames(className, 'modal-body');
return /*#__PURE__*/React.createElement(Tag, _extends({
className: classes
}, attributes, {
ref: innerRef
}));
};
CModalBody.propTypes = {
tag: tagPropType,
className: PropTypes.oneOfType([PropTypes.string, PropTypes.array, PropTypes.object]),
//
innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func])
};
CModalBody.defaultProps = {
tag: 'div'
};
export default CModalBody;