UNPKG

@coreui/react-pro

Version:

UI Components Library for React.js

27 lines (24 loc) 1.07 kB
import { __rest } from '../../node_modules/tslib/tslib.es6.js'; import React, { forwardRef } from 'react'; import PropTypes from 'prop-types'; import classNames from '../../_virtual/index.js'; import { colorPropType } from '../../props.js'; const CTableDataCell = forwardRef((_a, ref) => { var { children, active, align, className, color } = _a, rest = __rest(_a, ["children", "active", "align", "className", "color"]); const Component = rest.scope ? 'th' : 'td'; return (React.createElement(Component, Object.assign({ className: classNames({ [`align-${align}`]: align, 'table-active': active, [`table-${color}`]: color, }, className) || undefined }, rest, { ref: ref }), children)); }); CTableDataCell.propTypes = { active: PropTypes.bool, align: PropTypes.oneOf(['bottom', 'middle', 'top']), children: PropTypes.node, className: PropTypes.string, color: colorPropType, }; CTableDataCell.displayName = 'CTableDataCell'; export { CTableDataCell }; //# sourceMappingURL=CTableDataCell.js.map