cosmo-ui
Version:
Common React components
28 lines • 1.14 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var React = require("react");
var cx = require("classnames");
var styles = require('../../src/styles/components/table.scss');
var Table = (function (_super) {
tslib_1.__extends(Table, _super);
function Table() {
return _super !== null && _super.apply(this, arguments) || this;
}
Table.prototype.render = function () {
return (React.createElement("table", { className: this.classNames(), cellPadding: 0, cellSpacing: 0 }, this.props.children));
};
Table.prototype.classNames = function () {
return cx(styles.container, (_a = {},
_a[styles.bordered] = this.props.bordered,
_a[styles.condensed] = this.props.condensed,
_a[styles.striped] = this.props.striped,
_a[styles.hover] = this.props.hover,
_a[styles.stripedHover] = this.props.hover && this.props.striped,
_a), this.props.className);
var _a;
};
return Table;
}(React.Component));
exports.Table = Table;
//# sourceMappingURL=table.js.map